diff options
author | James M Snell <jasnell@gmail.com> | 2020-03-24 15:05:39 -0700 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-03-27 15:59:43 +0100 |
commit | a0578714bf50a473563fa32bad258aad92351ba0 (patch) | |
tree | 84e927f4c79ac126aec7d149118f475ab074d6a6 /lib/repl.js | |
parent | 1428a92492469b7ea1ee91acd204854a615be4eb (diff) | |
download | node-new-a0578714bf50a473563fa32bad258aad92351ba0.tar.gz |
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: https://github.com/nodejs/node/pull/32474
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib/repl.js')
-rw-r--r-- | lib/repl.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/repl.js b/lib/repl.js index 00820953b5..3186e0a31b 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1378,7 +1378,7 @@ REPLServer.prototype.defineCommand = function(keyword, cmd) { if (typeof cmd === 'function') { cmd = { action: cmd }; } else if (typeof cmd.action !== 'function') { - throw new ERR_INVALID_ARG_TYPE('action', 'Function', cmd.action); + throw new ERR_INVALID_ARG_TYPE('cmd.action', 'Function', cmd.action); } this.commands[keyword] = cmd; }; |