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:
Nathan Rajlich 2011-10-19 13:46:06 -07:00 committed by koichik
parent 7e2d799328
commit bdb9d09aef

View File

@ -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');
}