Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

fix: Non personalized ads TypeError #148

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

schneefux
Copy link
Contributor

a65b8f3 broke non personalized ads.
(adsbygoogle = window.adsbygoogle || []).push({}).requestNonPersonalizedAds = 1; is not valid, because push() returns the length of the array (see MDN).
This won't show any ads for NPA users or trigger TypeError: Cannot set property 'requestNonPersonalizedAds' of undefined for some users.

see also https://support.google.com/adsense/answer/9042142?hl=en

@auto-comment
Copy link

auto-comment bot commented Jun 25, 2020

Thank you for raising your pull request. Please make sure you have followed @mazipan And please push ⭐ button in this repository

@mazipan mazipan merged commit 2b67b2f into mazipan:master Jun 25, 2020
@schneefux schneefux deleted the feature/fix-personalized-ads branch June 25, 2020 14:58
@mazipan
Copy link
Owner

mazipan commented Jun 25, 2020

Released 1.8.3

@mazipan
Copy link
Owner

mazipan commented Jun 25, 2020

@all-contributors please add @schneefux for code and bug

@allcontributors
Copy link
Contributor

@mazipan

I've put up a pull request to add @schneefux! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants