Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information...
TooTallNate authored and koichik committed Oct 19, 2011
1 parent 7e2d799 commit bdb9d09aefbc12daf4d9f9106d763cefd1a84c50
Showing with 1 addition and 1 deletion.
  1. +1 −1 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');
}

0 comments on commit bdb9d09

Please sign in to comment.
You can’t perform that action at this time.