Skip to content

Commit a057871

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 1428a92 commit a057871

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
@@ -1378,7 +1378,7 @@ REPLServer.prototype.defineCommand = function(keyword, cmd) {
13781378
if (typeof cmd === 'function') {
13791379
cmd = { action: cmd };
13801380
} else if (typeof cmd.action !== 'function') {
1381-
throw new ERR_INVALID_ARG_TYPE('action', 'Function', cmd.action);
1381+
throw new ERR_INVALID_ARG_TYPE('cmd.action', 'Function', cmd.action);
13821382
}
13831383
this.commands[keyword] = cmd;
13841384
};

0 commit comments

Comments
 (0)