From bdb9d09aefbc12daf4d9f9106d763cefd1a84c50 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Wed, 19 Oct 2011 13:46:06 -0700 Subject: [PATCH] Print out `undefined` on the REPL when returned. util.inspect() has a special case for "undefined", so it's nice to be able to distinguish visually that undefined is the result of an expression. --- lib/repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repl.js b/lib/repl.js index 153d415f4d9..6f58f764797 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -224,7 +224,7 @@ function REPLServer(prompt, stream, eval, useGlobal) { self.bufferedCommand = ''; // If we got any output - print it (if no error) - if (!e && ret !== undefined) { + if (!e) { self.context._ = ret; self.outputStream.write(exports.writer(ret) + '\n'); }