ExodusMovement / schemasafe

A reasonably safe JSON Schema validator with draft-04/06/07/2019-09/2020-12 support.
https://npmjs.com/@exodus/schemasafe
MIT License
156 stars 12 forks source link

Cleaner error message on undefined nodes #88

Closed ChALkeR closed 4 years ago

ChALkeR commented 4 years ago

Before, it threw with Cannot convert undefined or null to object in some cases.

Now, all non-object invalid schemas produce Schema is not an object error.

Tests included.

No actual behavior change except for the clarified error message.