Skip to content

Commit

Permalink
amp-sticky-ad to amp-ad experiment fair by waiting for amp-ad to load…
Browse files Browse the repository at this point in the history
… first (#35561)
  • Loading branch information
powerivq committed Aug 6, 2021
1 parent 71e02a2 commit 90afe34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/amp-sticky-ad/1.0/amp-sticky-ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ class AmpStickyAd extends AMP.BaseElement {
}

if (!enableConversion) {
return null;
// Wait for the amp-ad extension to be loaded for a fairer comparison
return Services.extensionsFor(this.win)
.loadElementClass('amp-ad', '0.1')
.then(() => null);
}

ad.setAttribute('sticky', 'bottom');
Expand Down

0 comments on commit 90afe34

Please sign in to comment.