From b57f1a8d753a2baf07d92c5a13d674c02e07e538 Mon Sep 17 00:00:00 2001 From: Thomas Brouard Date: Mon, 31 Oct 2016 16:49:15 +0100 Subject: [PATCH] Fix .close() not working --- index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index baf8dfc..1c18cb9 100644 --- a/index.js +++ b/index.js @@ -151,10 +151,11 @@ class Tab { } close () { - this.tabContainer.removeChild(this.tab); - this.tabGroup.viewContainer.removeChild(this.webview); - this.tabGroup.removeTab(this); - this.tabGroup.activateRecentTab(); + let tabGroup = this.tabGroup; + tabGroup.tabContainer.removeChild(this.tab); + tabGroup.viewContainer.removeChild(this.webview); + tabGroup.removeTab(this); + tabGroup.activateRecentTab(); } }