fix global leak of variable error in schema.js
Merge pull request #829 from iamdoron/patch-2

fix global leak of variable 'error' in schema.js