Skip to content

Commit

Permalink
Fixes brave/brave-browser#6148 - still displays ads box when there is…
Browse files Browse the repository at this point in the history
… no history
  • Loading branch information
ryanml committed Sep 26, 2019
1 parent 8fd09f3 commit e552841
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/brave_rewards/resources/page/components/adsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,8 @@ class AdsBox extends React.Component<Props, State> {
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 (
Expand Down

0 comments on commit e552841

Please sign in to comment.