Skip to content

Commit

Permalink
debugger: remove undefined parameter
Browse files Browse the repository at this point in the history
The data parameter of unpackError() is typically undefined.

PR-URL: #39570
Refs: https://github.com/nodejs/node-inspect/issues/101
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
Trott authored and targos committed Sep 4, 2021
1 parent 030036e commit f46e8cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/debugger/inspect_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f46e8cd

Please sign in to comment.