We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hasKeyword
This is related to hasKeyword function. The body of the function needs to change from
typeof schema === "object" && Object.hasOwn(schema, keyword)
To
schema !== null && typeof schema === "object" && Object.hasOwn(schema, keyword)
Explanation: typeof null returns "object" and Object.hasOwn will throw if null is passed as first argument.
typeof null
"object"
Object.hasOwn
null
The text was updated successfully, but these errors were encountered:
fix(json-schema-2020-12): fix predicate in hasKeyword function
54fe4dd
Refs #8686
fix(json-schema-2020-12): fix predicate in hasKeyword function (#8692)
1931b45
char0n
No branches or pull requests
This is related to hasKeyword function. The body of the function needs to change from
To
Explanation:
typeof null
returns"object"
andObject.hasOwn
will throw ifnull
is passed as first argument.The text was updated successfully, but these errors were encountered: