Skip to content

Commit

Permalink
Merge pull request #1366 from Tyriar/1363_fix_demo
Browse files Browse the repository at this point in the history
Prevent falsy write values
  • Loading branch information
Tyriar authored Apr 2, 2018
2 parents d4b75e4 + 307744b commit 989f587
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 989f587

Please sign in to comment.