diff --git a/lib/fs.js b/lib/fs.js index 16bd80998e0552..dc311ee1b1ac38 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1539,7 +1539,7 @@ realpathSync.native = (path, options) => { function realpath(p, options, callback) { - callback = maybeCallback(typeof options === 'function' ? options : callback); + callback = typeof options === 'function' ? options : maybeCallback(callback); if (!options) options = emptyObj; else