From 6c375e18b64e479734c36baf8b9d9af098498352 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 28 Jul 2021 20:55:50 -0700 Subject: [PATCH] debugger: remove undefined parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The data parameter of unpackError() is typically undefined. PR-URL: https://github.com/nodejs/node/pull/39570 Refs: https://github.com/nodejs/node-inspect/issues/101 Reviewed-By: Jan Krems Reviewed-By: Michaƫl Zasso --- lib/internal/debugger/inspect_client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/debugger/inspect_client.js b/lib/internal/debugger/inspect_client.js index 419b984cc9f473..5c72304ba285c3 100644 --- a/lib/internal/debugger/inspect_client.js +++ b/lib/internal/debugger/inspect_client.js @@ -40,8 +40,8 @@ const kMaskingKeyWidthInBytes = 4; // https://tools.ietf.org/html/rfc6455#section-1.3 const WEBSOCKET_HANDSHAKE_GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; -function unpackError({ code, message, data }) { - const err = new ERR_DEBUGGER_ERROR(`${message} - ${data}`); +function unpackError({ code, message }) { + const err = new ERR_DEBUGGER_ERROR(`${message}`); err.code = code; ErrorCaptureStackTrace(err, unpackError); return err;