summaryrefslogtreecommitdiff
path: root/lib/repl.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2020-03-24 15:05:39 -0700
committerAnna Henningsen <anna@addaleax.net>2020-03-27 15:59:43 +0100
commita0578714bf50a473563fa32bad258aad92351ba0 (patch)
tree84e927f4c79ac126aec7d149118f475ab074d6a6 /lib/repl.js
parent1428a92492469b7ea1ee91acd204854a615be4eb (diff)
downloadnode-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.js2
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;
};