Fix NPE when open called twice

Fixes #2433
This commit is contained in:
Daniel Imms
2019-09-23 07:47:02 -07:00
parent ce39c0633c
commit f3b7866a19
+2 -2
View File
@@ -604,8 +604,8 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
// Performance: Add viewport and helper elements from the fragment
this.element.appendChild(fragment);
this._theme = this.options.theme;
this.options.theme = null;
this._theme = this.options.theme || this._theme;
this.options.theme = undefined;
this._colorManager = new ColorManager(document, this.options.allowTransparency);
this._colorManager.setTheme(this._theme);