Fix exception when reset is called before open

Fixes #1379
This commit is contained in:
Daniel Imms
2018-04-09 06:13:32 -07:00
parent 989f5873f5
commit cd06786d16
+3 -1
View File
@@ -2169,7 +2169,9 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
this._customKeyEventHandler = customKeyEventHandler;
this._inputHandler = inputHandler;
this.refresh(0, this.rows - 1);
this.viewport.syncScrollArea();
if (this.viewport) {
this.viewport.syncScrollArea();
}
}