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 danielleadams committed Aug 16, 2021
1 parent 058e882 commit 6c375e1
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 6c375e1

Please sign in to comment.