Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition #120

Open
crymall opened this issue Mar 11, 2020 · 0 comments
Open

Race condition #120

crymall opened this issue Mar 11, 2020 · 0 comments

Comments

@crymall
Copy link
Contributor

crymall commented Mar 11, 2020

There is a race condition causing this code (in DFP.ts) to run even when the slot does end up having a contentUrl:

 if (!slot.getContentUrl()) {
            this.ad.isEmpty = true;

            dispatchEvent(
              Number(this.id.substring(this.id.length, this.id.length - 1)),
              LOG_LEVELS.WARN,
              'DFP Network',
              'Ad sizes missing. Bypassing ad.',
            );
            resolve();
}

This causes ad lifecycle events intended for after the ad renders to think that the ad is empty when it is not.

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

No branches or pull requests

1 participant