You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The render method in createManager.js checks if any instance of adSlot has own property 'getServices'. If it does not it creates a dummy ad to enable publisher services with.
The hasOwnProperty method returns a false negative sometimes. This results in extraneous use of the dummyAdSlot implementation.
Consequently the googletag console shows errors concerning defineSlot being called without an accompanying call to render, which can inflate unfilled slot numbers.
Bugfix:
Replacing the use of "hasOwnProperty" with a check that adSlot is truthy, adSlot.getServices is truthy,
and that adSlot.getServices is a function before calling it fixes the issue. Possibly overkill, but it is certainly safe and more reliable than "hasOwnProperty". This may be due to the general unreliability of "hasOwnProperty" eslint/eslint#7071 or because in the reference to adSlot, getServices has been renamed to some abstracted random key, or a little of both.
Current behavior:
The render method in createManager.js checks if any instance of adSlot has own property 'getServices'. If it does not it creates a dummy ad to enable publisher services with.
The hasOwnProperty method returns a false negative sometimes. This results in extraneous use of the dummyAdSlot implementation.
Consequently the googletag console shows errors concerning defineSlot being called without an accompanying call to render, which can inflate unfilled slot numbers.
Bugfix:
Replacing the use of "hasOwnProperty" with a check that adSlot is truthy, adSlot.getServices is truthy,
and that adSlot.getServices is a function before calling it fixes the issue. Possibly overkill, but it is certainly safe and more reliable than "hasOwnProperty". This may be due to the general unreliability of "hasOwnProperty" eslint/eslint#7071 or because in the reference to adSlot, getServices has been renamed to some abstracted random key, or a little of both.
Accompanying PR: #84
Cheers!
react-gpt -v 2.10.2
node -v 8.5.0
npm -v 5.3.0
The text was updated successfully, but these errors were encountered: