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
I am encountering an issue with the behavior of ethicalads.wait. I expect that when no ads are available, the code should execute the branch displaying the alternative content (console.debug('Loading backup content');). However, in all cases, the code always executes the else branch, even when placements is an empty array.
Steps to Reproduce the Issue
Add the following code to the application:
ethicalads.load();ethicalads.wait.then((placements:any)=>{if(!placements.length){console.debug('Loading backup content');showAlternative=true;}else{console.debug('EthicalAds are loaded');}});
Check the behavior when no ads are available.
Expected Behavior
When no ads are available (placements is an empty array), I expect the if branch to execute, including console.debug('Loading backup content');.
Actual Behavior
Even when no ads are available, the code always executes the else branch and logs console.debug('EthicalAds are loaded');.
Additional Context
Browser and version: Google Chrome Version 132.0.6834.83 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered:
I have narrowed down the issue. The event occurs when I use the tag data-ea-manual="false".
I created a JSBin with an example where I deliberately set an incorrect data-ea-publisher (but placements end up being [null] even if the publisher is set to "test").
However, when it is set with data-ea-manual="false", everything works correctly.
I am encountering an issue with the behavior of
ethicalads.wait
. I expect that when no ads are available, the code should execute the branch displaying the alternative content (console.debug('Loading backup content');
). However, in all cases, the code always executes theelse
branch, even whenplacements
is an empty array.Steps to Reproduce the Issue
Expected Behavior
When no ads are available (
placements
is an empty array), I expect theif
branch to execute, includingconsole.debug('Loading backup content');
.Actual Behavior
Even when no ads are available, the code always executes the
else
branch and logsconsole.debug('EthicalAds are loaded');
.Additional Context
The text was updated successfully, but these errors were encountered: