diff --git a/src/core/plugins/json-schema-2020-12/fn.js b/src/core/plugins/json-schema-2020-12/fn.js index b45e2a5f734..2f77bacf51e 100644 --- a/src/core/plugins/json-schema-2020-12/fn.js +++ b/src/core/plugins/json-schema-2020-12/fn.js @@ -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()