From 2c737a89d59a0c3fa471d36031c64550607fc367 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sun, 27 Jan 2019 01:20:08 +0100 Subject: [PATCH] repl: remove obsolete buffer clearing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Ben Noordhuis --- lib/repl.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/repl.js b/lib/repl.js index ef1c6ee553bdea..ffb232fe3d8d63 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -638,7 +638,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; }