mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user