diff --git a/lib/fs.js b/lib/fs.js index a5fadf6aeb45ea..9cafa13f503874 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1571,7 +1571,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