fix(json-schema-2020-12): fix predicate in hasKeyword function (#8692)

Refs #8686
This commit is contained in:
Vladimír Gorej
2023-05-22 15:14:39 +02:00
committed by GitHub
parent 98e7beb14a
commit 1931b45eb0

View File

@@ -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()