Skip to content

Commit

Permalink
fix(json-schema-2020-12): fix predicate in hasKeyword function (#8692)
Browse files Browse the repository at this point in the history
Refs #8686
  • Loading branch information
char0n authored May 22, 2023
1 parent 98e7beb commit 1931b45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/plugins/json-schema-2020-12/fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ export const getType = (schema, processedSchemas = new WeakSet()) => {
export const isBooleanJSONSchema = (schema) => typeof schema === "boolean"

export const hasKeyword = (schema, keyword) =>
typeof schema === "object" && Object.hasOwn(schema, keyword)
schema !== null &&
typeof schema === "object" &&
Object.hasOwn(schema, keyword)

export const isExpandable = (schema) => {
const fn = useFn()
Expand Down

0 comments on commit 1931b45

Please sign in to comment.