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.
This commit is contained in:
parent
7e2d799328
commit
bdb9d09aef
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user