From 307744be665a715ce852f63632d19a57fa79df2c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 2 Apr 2018 08:22:22 -0700 Subject: [PATCH] Prevent falsy write values Fixes #1363 --- src/Terminal.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Terminal.ts b/src/Terminal.ts index 6d52970c17..e441a5b44f 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -1252,6 +1252,11 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT * @param {string} data The text to write to the terminal. */ public write(data: string): void { + // Ignore falsy data values (including the empty string) + if (!data) { + return; + } + this.writeBuffer.push(data); // Send XOFF to pause the pty process if the write buffer becomes too large so