repl: remove obsolete buffer clearing

It is checked if an command buffer exists or not. This code branch
can only be reached if none exist, so there's no need to clear that
buffer again.

PR-URL: https://github.com/nodejs/node/pull/25731
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Ruben Bridgewater 2019-01-27 01:20:08 +01:00 committed by Daniel Bevenius
parent f9fe037088
commit 8c12a78d20

View File

@ -637,7 +637,6 @@ function REPLServer(prompt,
self.outputStream.write('npm should be run outside of the ' +
'node repl, in your normal shell.\n' +
'(Press Control-D to exit.)\n');
self.clearBufferedCommand();
self.displayPrompt();
return;
}