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) }