mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #1366 from Tyriar/1363_fix_demo
Prevent falsy write values
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user