Browse Source

Fix null check error

Jason Grout 5 years ago
parent
commit
b7d29483ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/services/src/terminal/default.ts

+ 1 - 1
packages/services/src/terminal/default.ts

@@ -103,7 +103,7 @@ export class TerminalConnection implements Terminal.ITerminalConnection {
     if (this._isDisposed || !message.content) {
       return;
     }
-    if (this.connectionStatus === 'connected') {
+    if (this.connectionStatus === 'connected' && this._ws) {
       const msg = [message.type, ...message.content];
       this._ws.send(JSON.stringify(msg));
     } else if (queue) {