From 4b2a2476ea19f16336a4be2f059151c499707ac9 Mon Sep 17 00:00:00 2001 From: Thomas Brouard Date: Mon, 31 Oct 2016 18:08:24 +0100 Subject: [PATCH] Prevent closing tab when closable is set to false --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 1e951b0..d1697da 100644 --- a/index.js +++ b/index.js @@ -189,7 +189,8 @@ class Tab { // TODO: move } - close () { + close (force) { + if (!this.closable && !force) return; let tabGroup = this.tabGroup; tabGroup.tabContainer.removeChild(this.tab); tabGroup.viewContainer.removeChild(this.webview);