-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
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)
Metadata
Metadata
Assignees
Labels
No labels