From 2b48a381b9d2af8441cb43daefa1e1e4be68da05 Mon Sep 17 00:00:00 2001 From: ZYSzys <17367077526@163.com> Date: Fri, 21 Dec 2018 16:03:50 +0800 Subject: [PATCH] fs: remove redundant callback check PR-URL: https://github.com/nodejs/node/pull/25160 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- lib/fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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