diff --git a/app/visit.js b/app/visit.js index e362b2f..c01f79a 100644 --- a/app/visit.js +++ b/app/visit.js @@ -20,7 +20,7 @@ function visit(old, options) { const level = sortOptions.level || 1; const processing = level <= depth; - if (typeof (old) !== 'object' || old === null) { + if (typeof (old) !== 'object' || old === null || (!processing && !reverse)) { return old; }