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...
1 parent 9d27faa commit cb6a8056c921f58c488d05e6dfc542dd8415d0e8 @TooTallNate committed Oct 19, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/repl.js
View
2 lib/repl.js
@@ -228,7 +228,7 @@ function REPLServer(prompt, stream, eval) {
self.bufferedCommand = '';
// If we got any output - print it (if no error)
- if (!e && ret !== undefined) {
+ if (!e) {
global._ = ret;
self.outputStream.write(exports.writer(ret) + '\n');
}

0 comments on commit cb6a805

Please sign in to comment.