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

do not allow showing resources blocked if there's none #42

Merged
merged 1 commit into from
Jul 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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