fix(animations): ensure a null easing value is never used with web-animations
Closes #9780 Closes #9752
This commit is contained in:
@ -48,13 +48,18 @@ export class WebAnimationsDriver implements AnimationDriver {
|
||||
formattedSteps = [start, start];
|
||||
}
|
||||
|
||||
var playerOptions = {
|
||||
var playerOptions: {[key: string]: string | number} = {
|
||||
'duration': duration,
|
||||
'delay': delay,
|
||||
'easing': easing,
|
||||
'fill': 'both' // we use `both` because it allows for styling at 0% to work with `delay`
|
||||
};
|
||||
|
||||
// we check for this to avoid having a null|undefined value be present
|
||||
// for the easing (which results in an error for certain browsers #9752)
|
||||
if (easing) {
|
||||
playerOptions['easing'] = easing;
|
||||
}
|
||||
|
||||
var player = this._triggerWebAnimation(anyElm, formattedSteps, playerOptions);
|
||||
|
||||
return new WebAnimationsPlayer(player, duration);
|
||||
|
Reference in New Issue
Block a user