From e552841f472bc85f5a2eec409ad8c77480c4e9ed Mon Sep 17 00:00:00 2001 From: ryanml Date: Wed, 25 Sep 2019 17:14:29 -0700 Subject: [PATCH] Fixes brave/brave-browser#6148 - still displays ads box when there is no history --- .../brave_rewards/resources/page/components/adsBox.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/brave_rewards/resources/page/components/adsBox.tsx b/components/brave_rewards/resources/page/components/adsBox.tsx index 18c7af618d93..8587c2d45a1f 100644 --- a/components/brave_rewards/resources/page/components/adsBox.tsx +++ b/components/brave_rewards/resources/page/components/adsBox.tsx @@ -280,11 +280,8 @@ class AdsBox extends React.Component { const toggle = !(!enabledMain || !adsUIEnabled || !adsIsSupported) const showDisabled = firstLoad !== false || !toggle || !adsEnabled || !adsIsSupported - if (!adsHistory) { - return null - } - - const rows = this.getAdHistoryData(adsHistory, savedOnly) + const historyEntries = adsHistory || [] + const rows = this.getAdHistoryData(historyEntries, savedOnly) const notEmpty = rows && rows.length !== 0 return (