Update js error check
Merge pull request #36 from jerv13/master

Update js error check