From 2a33764b1922818ab9f6d6bdf76cf972462b02da Mon Sep 17 00:00:00 2001 From: MaleDong <maledong_github@outlook.com> Date: Sat, 11 Aug 2018 19:26:40 +0800 Subject: [PATCH] lib: Remove unused param for `filterInternalStackFrames` Actually we don't refer the `error` directly in `filterInternalStackFrames`, so just remove it anyway. --- lib/repl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 4a01595ce1b72b..9530d57a347468 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -494,7 +494,7 @@ function REPLServer(prompt, self.writer.options = Object.assign({}, writer.options, { colors: true }); } - function filterInternalStackFrames(error, structuredStack) { + function filterInternalStackFrames(structuredStack) { // Search from the bottom of the call stack to // find the first frame with a null function name if (typeof structuredStack !== 'object') @@ -509,7 +509,7 @@ function REPLServer(prompt, function prepareStackTrace(fn) { return (error, stackFrames) => { - const frames = filterInternalStackFrames(error, stackFrames); + const frames = filterInternalStackFrames(stackFrames); if (fn) { return fn(error, frames); }