From 33e4d0564769d247311b21152bdd535d4100c87c Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Mon, 2 Jul 2018 18:30:07 -0300 Subject: [PATCH] do not allow showing resources blocked if there's none fix https://github.com/brave/brave-browser/issues/419 --- app/components/braveShields/braveShieldsStats.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/braveShields/braveShieldsStats.tsx b/app/components/braveShields/braveShieldsStats.tsx index a6528b46aebe..222f6346251b 100644 --- a/app/components/braveShields/braveShieldsStats.tsx +++ b/app/components/braveShields/braveShieldsStats.tsx @@ -88,13 +88,13 @@ export default class BraveShieldsStats extends React.Component 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