Skip to content

Commit

Permalink
set deactivated terminal handlers to empty functions instead of null
Browse files Browse the repository at this point in the history
this allows to avoid console spamming with 'not a function' messages
after the connection to server was closed.
  • Loading branch information
DenKoren committed Nov 24, 2017
1 parent 9ac120a commit b4728f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/src/hterm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export class Hterm {
};

deactivate(): void {
this.io.onVTKeystroke = null;
this.io.sendString = null
this.io.onTerminalResize = null;
this.io.onVTKeystroke = function(){};
this.io.sendString = function(){};
this.io.onTerminalResize = function(){};
this.term.uninstallKeyboard();
}

Expand Down

0 comments on commit b4728f6

Please sign in to comment.