Skip to content

Commit

Permalink
Don't try to create tab if windowId is falsey
Browse files Browse the repository at this point in the history
Fixes brave#8545

Auditors: @mrose17

Test plan:
1. Ensure Payments are enabled and Open `about:blank`
2. From the `Shields` menu, pick `Site Shield Settings...`
3. Verify nothing happens and that the app doesn't crash
  • Loading branch information
bsclifton committed Apr 28, 2017
1 parent c88f470 commit d9745a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/browser/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ const api = {
const url = normalizeUrl(createProperties.get('url'))
createProperties = createProperties.set('url', url)
const windowId = createProperties.get('windowId')
if (!windowId) {
return state
}
const tabData = tabState.getMatchingTab(state, createProperties, windowId, url)
if (tabData) {
const tab = getWebContents(tabData.get('id'))
Expand Down

0 comments on commit d9745a5

Please sign in to comment.