Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit cb6a8056c921f58c488d05e6dfc542dd8415d0e8 1 parent 9d27faa
Nathan Rajlich authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/repl.js
2  lib/repl.js
View
@@ -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');
}
Please sign in to comment.
Something went wrong with that request. Please try again.