diff --git a/lib/repl.js b/lib/repl.js index 0ac6bc5217d..3feb651fa85 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -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'); }