Skip to content

Commit

Permalink
do not allow showing resources blocked if there's none
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Jul 2, 2018
1 parent bdf4ea1 commit 33e4d05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/components/braveShields/braveShieldsStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ export default class BraveShieldsStats extends React.Component<BraveShieldsStats
fingerprintingBlockedDetailsOpen
} = this.state

if (adsTrackersBlockedDetailsOpen) {
if (adsTrackersBlockedDetailsOpen && this.totalAdsTrackersBlocked > 0) {
return this.setResourceBlockedItemView(this.totalAdsTrackersBlockedResources)
} else if (httpsRedirectedDetailsOpen) {
} else if (httpsRedirectedDetailsOpen && this.httpsRedirected > 0) {
return this.setResourceBlockedItemView(this.httpsRedirectedResources)
} else if (javascriptBlockedDetailsOpen) {
} else if (javascriptBlockedDetailsOpen && this.javascriptBlocked > 0) {
return this.setResourceBlockedItemView(this.javascriptBlockedResources)
} else if (fingerprintingBlockedDetailsOpen) {
} else if (fingerprintingBlockedDetailsOpen && this.fingerprintingBlocked > 0) {
return this.setResourceBlockedItemView(this.fingerprintingBlockedResources)
} else {
return null
Expand Down

0 comments on commit 33e4d05

Please sign in to comment.