Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
check to see if the tab was active before it was closed
Browse files Browse the repository at this point in the history
fix #9306
  • Loading branch information
bridiver committed Jun 18, 2017
1 parent 4806d38 commit e68dc1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/browser/reducers/tabsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ const updateActiveTab = (state, closeTabId) => {
return
}

if (!tabState.isActive(state, closeTabId)) {
const windowId = tabState.getWindowId(state, closeTabId)
if (windowId === windowState.WINDOW_ID_NONE) {
return
}

const windowId = tabState.getWindowId(state, closeTabId)
if (windowId === windowState.WINDOW_ID_NONE) {
const wasActiveBeforeClose = tabState.getTabsByLastActivated(state, windowId).last()
if (!wasActiveBeforeClose && !tabState.isActive(state, closeTabId)) {
return
}

Expand Down

0 comments on commit e68dc1a

Please sign in to comment.