Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ajv/lib/dotjs/items.js')
-rw-r--r--node_modules/ajv/lib/dotjs/items.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/ajv/lib/dotjs/items.js b/node_modules/ajv/lib/dotjs/items.js
index 139c1d947..bee5d67da 100644
--- a/node_modules/ajv/lib/dotjs/items.js
+++ b/node_modules/ajv/lib/dotjs/items.js
@@ -66,7 +66,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
l1 = arr1.length - 1;
while ($i < l1) {
$sch = arr1[$i += 1];
- if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {
+ if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {
out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';
var $passData = $data + '[' + $i + ']';
$it.schema = $sch;
@@ -89,7 +89,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
}
}
}
- if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) {
+ if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) {
$it.schema = $additionalItems;
$it.schemaPath = it.schemaPath + '.additionalItems';
$it.errSchemaPath = it.errSchemaPath + '/additionalItems';
@@ -113,7 +113,7 @@ module.exports = function generate_items(it, $keyword, $ruleType) {
$closingBraces += '}';
}
}
- } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {
+ } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {
$it.schema = $schema;
$it.schemaPath = $schemaPath;
$it.errSchemaPath = $errSchemaPath;