Skip to content

Commit

Permalink
Fix Trace disabled mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed Sep 11, 2019
1 parent 563095a commit 460b703
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,12 @@ internals.entry = function (value, schema, prefs) {

internals.tracer = function (schema, prefs) {

Assert(schema.$_root.trace, 'Debug mode not supported');

if (schema.$_root._tracer) {
return { tracer: schema.$_root._tracer._register(schema) };
}

if (prefs.debug) {
Assert(schema.$_root.trace, 'Debug mode not supported');
return { tracer: schema.$_root.trace()._register(schema), cleanup: true };
}

Expand Down

0 comments on commit 460b703

Please sign in to comment.