From 801814686d4745840743d45c54abb41940fb41e2 Mon Sep 17 00:00:00 2001 From: MaleDong Date: Sat, 11 Aug 2018 19:26:40 +0800 Subject: [PATCH] lib: remove unused filterInternalStackFrames param Actually we don't refer the `error` directly in `filterInternalStackFrames`, so just remove it anyway. PR-URL: https://github.com/nodejs/node/pull/22267 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Jon Moss Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell --- 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); }