mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
repl: print out undefined
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.
This commit is contained in:
parent
b43eb9678b
commit
95d530f2b4
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user