From b842057f26b4eb1d955c2de59852c1cf30c93de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 23 Sep 2019 22:31:55 -0400 Subject: [PATCH] refactor: remove temp var --- src/file.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/file.js b/src/file.js index 19b8fd94c9..7a9a366076 100644 --- a/src/file.js +++ b/src/file.js @@ -165,8 +165,7 @@ file.walk = async function (dir) { const res = path.resolve(dir, subdir); return (await statAsync(res)).isDirectory() ? file.walk(res) : res; })); - var result = files.reduce((a, f) => a.concat(f), []); - return result; + return files.reduce((a, f) => a.concat(f), []); }; require('./promisify')(file);