Prevent falsy write values

Fixes #1363
This commit is contained in:
Daniel Imms
2018-04-02 08:22:22 -07:00
parent d4b75e4909
commit 307744be66
+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