fix: compileAsync schema with multiple remote schemas and some recursive, fixes #801

master
Evgeny Poberezkin 2018-06-10 10:58:30 +01:00
parent 15c6d07fe5
commit 32651b5cfd
2 changed files with 5 additions and 1 deletions

View File

@ -351,6 +351,10 @@ function _compile(schemaObj, root) {
var v;
try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
catch(e) {
delete schemaObj.validate;
throw e;
}
finally {
schemaObj.compiling = false;
if (schemaObj.meta) this._opts = currentOpts;

View File

@ -430,7 +430,7 @@ describe('compileAsync method', function() {
});
describe.skip('schema with multiple remote properties, the first is recursive schema (#801)', function() {
describe('schema with multiple remote properties, the first is recursive schema (#801)', function() {
it('should validate data', function() {
var schema = {
"$id": "http://example.com/list.json",