Skip to content

Commit

Permalink
Ad now sets error to true if it fails to load
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Feb 11, 2024
1 parent db44244 commit a8b8279
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/ads/AppBannerAd.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ class AppBannerAdClass extends Component {
requestOptions={{
requestNonPersonalizedAdsOnly: true,
}}
onAdFailedToLoad={(error) => console.warn('An error occured while loading ad:', error)}
onAdFailedToLoad={(error) => {
console.warn('Failed to load ad:', error)
this.setState({error: true})
}}
/>
)
}
Expand Down

0 comments on commit a8b8279

Please sign in to comment.