Skip to content

Commit

Permalink
Don't send progress events to the progress bar for ad pages. (#17288)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmajoulet authored Aug 3, 2018
1 parent f4898fb commit e05e9f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extensions/amp-story/1.0/amp-story-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,11 @@ export class AmpStoryPage extends AMP.BaseElement {
* @param {number} progress The progress from 0.0 to 1.0.
*/
emitProgress_(progress) {
// Don't emit progress for ads, since the progress bar is hidden.
if (this.isAd()) {
return;
}

const payload = dict({
'pageId': this.element.id,
'progress': progress,
Expand Down

0 comments on commit e05e9f1

Please sign in to comment.