add a check to see if the js block exists
Merge pull request #4 from jeremyBass/master

[HF] add a check to see if the js block exists