fix(animations): ensure the web-animations driver properly handles empty keyframes (#20648)

Closes #15858

PR Close #20648
This commit is contained in:
Matias Niemelä
2017-11-27 14:40:09 -08:00
committed by Jason Aden
parent 10771d0bd8
commit c26e1bba1d
2 changed files with 19 additions and 1 deletions

View File

@ -65,7 +65,7 @@ export class WebAnimationsPlayer implements AnimationPlayer {
const keyframes = this.keyframes.map(styles => copyStyles(styles, false));
const previousStyleProps = Object.keys(this.previousStyles);
if (previousStyleProps.length) {
if (previousStyleProps.length && keyframes.length) {
let startingKeyframe = keyframes[0];
let missingStyleProps: string[] = [];
previousStyleProps.forEach(prop => {