From 4df6a8fa5dbf6abc2803bc9c7b9b03b991245db5 Mon Sep 17 00:00:00 2001 From: ZYSzys <17367077526@163.com> Date: Fri, 21 Dec 2018 16:03:50 +0800 Subject: [PATCH] fs: reduce redundant callback check --- lib/fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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