Navigation Menu

Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
repl: print out undefined
Browse files Browse the repository at this point in the history
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 bnoordhuis committed Oct 20, 2011
1 parent b43eb96 commit 95d530f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/repl.js
Expand Up @@ -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');
}
Expand Down

0 comments on commit 95d530f

Please sign in to comment.