Comparing version 3.25.0 to 3.25.1
{ | ||
"name": "z-schema", | ||
"version": "3.25.0", | ||
"version": "3.25.1", | ||
"description": "JSON schema validator", | ||
@@ -39,2 +39,3 @@ "homepage": "https://github.com/zaggino/z-schema", | ||
"test": "jasmine-node test/ && grunt lint", | ||
"test-z": "jasmine-node test/spec/ZSchemaTestSuiteSpec.js", | ||
"grunt": "grunt" | ||
@@ -41,0 +42,0 @@ }, |
@@ -343,6 +343,10 @@ "use strict"; | ||
if (formatValidatorFn.length === 2) { | ||
// async | ||
// async - need to clone the path here, because it will change by the time async function reports back | ||
var pathBeforeAsync = Utils.clone(report.path); | ||
report.addAsyncTask(formatValidatorFn, [json], function (result) { | ||
if (result !== true) { | ||
var backup = report.path; | ||
report.path = pathBeforeAsync; | ||
report.addError("INVALID_FORMAT", [schema.format, json], null, schema); | ||
report.path = backup; | ||
} | ||
@@ -457,6 +461,3 @@ }); | ||
exports.validate.call(this, report, s[idx2], propertyValue); | ||
// commented out to resolve issue #209 - the path gets popped before async tasks complete | ||
// all the tests run fine without, there seems to be no reason to have this pop here | ||
// report.path.pop(); | ||
report.path.pop(); | ||
} | ||
@@ -463,0 +464,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1583248
36460