From 9d68e568569aa9b8ddf387b3d58adb6ae7e3cc22 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sun, 4 Nov 2018 09:52:28 -0500 Subject: [PATCH] fs: remove unused catch bindings PR-URL: https://github.com/nodejs/node/pull/24079 Reviewed-By: Sam Roberts Reviewed-By: Wyatt Preul --- lib/fs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index dba9049faec..ef516a218c7 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -209,7 +209,7 @@ function exists(path, callback) { try { fs.access(path, F_OK, suppressedCallback); - } catch (err) { + } catch { return callback(false); } } @@ -230,7 +230,7 @@ function existsSync(path) { try { path = toPathIfFileURL(path); validatePath(path); - } catch (e) { + } catch { return false; } const ctx = { path };