Skip to content

Commit

Permalink
Merge pull request #388 from SquareTable/386-if-an-ad-fails-to-load-e…
Browse files Browse the repository at this point in the history
…rror-should-be-set-to-true

Ad now sets error to true if it fails to load
  • Loading branch information
Sebastian-Webster authored Feb 11, 2024
2 parents db44244 + a8b8279 commit 2e737b1
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 2e737b1

Please sign in to comment.