Skip to content

Commit 7c0c4e9

Browse files
jasnelltargos
authored andcommittedApr 22, 2020
repl: fixup error message
Use "cmd.action" instead of just "action" for ERR_INVALID_ARG_TYPE Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #32474 Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 5d15dd3 commit 7c0c4e9

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
@@ -1447,7 +1447,7 @@ REPLServer.prototype.defineCommand = function(keyword, cmd) {
14471447
if (typeof cmd === 'function') {
14481448
cmd = { action: cmd };
14491449
} else if (typeof cmd.action !== 'function') {
1450-
throw new ERR_INVALID_ARG_TYPE('action', 'Function', cmd.action);
1450+
throw new ERR_INVALID_ARG_TYPE('cmd.action', 'Function', cmd.action);
14511451
}
14521452
this.commands[keyword] = cmd;
14531453
};

0 commit comments

Comments
 (0)
Please sign in to comment.