Skip to content

Commit

Permalink
πŸ› try/catch when pausing animations (#28423)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanorozco committed May 14, 2020
1 parent 02787ec commit 195d7bd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions extensions/amp-story/1.0/animation.js
Expand Up @@ -374,9 +374,12 @@ export class AnimationRunner {
}

if (this.runner_) {
// Init or no-op if the runner was already running.
this.runner_.start();
this.runner_.pause();
try {
this.runner_.pause();
} catch {
// This fails when the animation is finished explicitly
// (runner.finish()) since this destroys internal players. This is fine.
}
}
}

Expand Down

0 comments on commit 195d7bd

Please sign in to comment.