diff options
Diffstat (limited to 'deps/npm/node_modules/ajv/lib/dotjs/const.js')
-rw-r--r-- | deps/npm/node_modules/ajv/lib/dotjs/const.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/npm/node_modules/ajv/lib/dotjs/const.js b/deps/npm/node_modules/ajv/lib/dotjs/const.js index d19756e145..15b7c619ff 100644 --- a/deps/npm/node_modules/ajv/lib/dotjs/const.js +++ b/deps/npm/node_modules/ajv/lib/dotjs/const.js @@ -25,7 +25,7 @@ module.exports = function generate_const(it, $keyword, $ruleType) { $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; if (it.opts.messages !== false) { out += ' , message: \'should be equal to constant\' '; } @@ -38,7 +38,8 @@ module.exports = function generate_const(it, $keyword, $ruleType) { } var __err = out; out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ if (it.async) { out += ' throw new ValidationError([' + (__err) + ']); '; } else { |