diff --git a/lib/validator.js b/lib/validator.js index fd1354da4..3d5aa569b 100755 --- a/lib/validator.js +++ b/lib/validator.js @@ -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 }; }