From 1e942988ba2976d9c8551463aa783171f2f88242 Mon Sep 17 00:00:00 2001 From: Julian Grinblat Date: Fri, 3 Jun 2022 01:15:09 +0900 Subject: [PATCH] Fix check --- lib/types/keys.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/types/keys.js b/lib/types/keys.js index fc813e11..5b3b7024 100755 --- a/lib/types/keys.js +++ b/lib/types/keys.js @@ -144,7 +144,10 @@ module.exports = Any.extend({ if (schema.$_terms.dependencies) { for (const dep of schema.$_terms.dependencies) { - if (!internals.isPresent(dep.key && dep.key.resolve(value, state, prefs, null, { shadow: false }), dep.options)) { + if ( + dep.key !== null && + internals.isPresent(dep.key.resolve(value, state, prefs, null, { shadow: false }), dep.options) === false + ) { continue; }