From c2e03af33109e9289d157471fbd617ce83e3c496 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Tue, 11 Apr 2017 09:39:39 -0400 Subject: [PATCH] Only close frame if not already closed on tab Fix #8228 Auditors: @NejcZdovc --- js/components/tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/tab.js b/js/components/tab.js index e769ee31864..bc952afd431 100644 --- a/js/components/tab.js +++ b/js/components/tab.js @@ -148,7 +148,7 @@ class Tab extends ImmutableComponent { onTabClosedWithMouse (event) { event.stopPropagation() - if (this.props.onTabClosedWithMouse) { + if (this.props.onTabClosedWithMouse && this.frame && !this.frame.isEmpty()) { this.props.onTabClosedWithMouse(this.tabNode.parentNode.getBoundingClientRect()) windowActions.closeFrame(windowStore.getFrames(), this.frame) }