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

Commit

Permalink
properly set promise thenable to avoid console warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Oct 11, 2018
1 parent aed2d1d commit 930d807
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/background/reducers/shieldsPanelReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export default function shieldsPanelReducer (state: State = { tabs: {}, windows:
}
setAllowBraveShields(tabData.origin, action.setting)
.then(() => {
setAllowHTTPUpgradableResources(tabData.origin)
reloadTab(tabId, true).catch(() => {
console.error('Tab reload was not successful')
})
Expand All @@ -151,6 +150,16 @@ export default function shieldsPanelReducer (state: State = { tabs: {}, windows:
.catch(() => {
console.error('Could not set shields')
})
setAllowHTTPUpgradableResources(tabData.origin)
.then(() => {
requestShieldPanelData(shieldsPanelState.getActiveTabId(state))
reloadTab(tabData.id, true).catch(() => {
console.error('Tab reload was not successful')
})
})
.catch(() => {
console.error('Could not set HTTPS Everywhere setting')
})
state = shieldsPanelState
.updateTabShieldsData(state, tabId, { braveShields: action.setting })
break
Expand Down

0 comments on commit 930d807

Please sign in to comment.