Skip to content

Commit 8e00f0d

Browse files
jasnelladdaleax
authored andcommitted
repl: fixup error message
Use "cmd.action" instead of just "action" for ERR_INVALID_ARG_TYPE Signed-off-by: James M Snell <[email protected]> PR-URL: #32474 Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 7f0ed89 commit 8e00f0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/repl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ REPLServer.prototype.defineCommand = function(keyword, cmd) {
13801380
if (typeof cmd === 'function') {
13811381
cmd = { action: cmd };
13821382
} else if (typeof cmd.action !== 'function') {
1383-
throw new ERR_INVALID_ARG_TYPE('action', 'Function', cmd.action);
1383+
throw new ERR_INVALID_ARG_TYPE('cmd.action', 'Function', cmd.action);
13841384
}
13851385
this.commands[keyword] = cmd;
13861386
};

0 commit comments

Comments
 (0)