diff --git a/lib/repl.js b/lib/repl.js index 420b9558f99700..19272f2229c702 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1447,7 +1447,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; };