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

Commit

Permalink
Merge pull request #42 from brave/shields/419
Browse files Browse the repository at this point in the history
do not allow showing resources blocked if there's none
  • Loading branch information
bbondy authored Jul 3, 2018
2 parents 6305b0d + 33e4d05 commit 1be1f9c
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 1be1f9c

Please sign in to comment.