From b28be877bdc3e4db1474a0f7d8fa4e7a64c27b1c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 23 Sep 2019 07:47:02 -0700 Subject: [PATCH] Fix NPE when open called twice Fixes #2433 --- src/Terminal.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Terminal.ts b/src/Terminal.ts index d793abfc86..098c383b58 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -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);