You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #57, but for $data references: When a JSON schema has a $data reference to a key on an object that's undefined, JJV throws TypeError: Cannot call method 'hasOwnProperty' of undefined.
It appears that JJV calls hasOwnProperty() on the undefined value (inside resolveObjectRef) before checking that the value is in fact an object, resulting in this error.
Similar to #57, but for
$data
references: When a JSON schema has a$data
reference to a key on an object that's undefined, JJV throwsTypeError: Cannot call method 'hasOwnProperty' of undefined.
It appears that JJV calls
hasOwnProperty()
on theundefined
value (insideresolveObjectRef
) before checking that the value is in fact an object, resulting in this error.How to handle this is unfortunately not explicitly defined in the v5
$data
proposal, but I just wanted to point out that this is unexpected behavior.To reproduce, run
coffee test.coffee
:Note that the exception is not thrown when
b
is missing (in the above example)—only when it is explicitly set toundefined
.The text was updated successfully, but these errors were encountered: