Ensure we don't crash if the terminal socket is not ready yet

Upstream patch submitted https://github.com/sourcelair/xterm.js/pull/933
This commit is contained in:
Johannes Zellner
2017-08-31 20:30:40 +02:00
parent 6eb6eab3f4
commit 22b0100354

View File

@@ -66,6 +66,10 @@
};
term._sendData = function (data) {
if (socket.readyState !== 1) {
return;
}
socket.send(data);
};