Skip to content

Commit

Permalink
fix(loader): guard against endless wrapping
Browse files Browse the repository at this point in the history
The schema loader would wrap objects that have already been wrapped again. This was especially an
issue with recursive references, where it could lead to endless loops.

fixes #194
  • Loading branch information
trieloff committed Jan 13, 2020
1 parent 583bc99 commit dd1f7f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/schemaProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ const handler = ({
} else {
console.error('cannot resolve', basedoc);
}
} else if (retval[symbols.filename]) {
// console.log('I am in a loop!');
return retval;
}

// console.log('making new proxy from', target, prop, 'receiver', receiver[symbols.id]);
Expand Down

0 comments on commit dd1f7f6

Please sign in to comment.