Merge pull request #1366 from Tyriar/1363_fix_demo

Prevent falsy write values
This commit is contained in:
Daniel Imms
2018-04-02 08:23:53 -07:00
committed by GitHub
+5
View File
@@ -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