Skip to content

Commit 635c3b4

Browse files
JeanMecheatscott
authored andcommitted
refactor(animations): use existing helper methods. (#52441)
Saving a few bytes. PR Close #52441
1 parent e8f0042 commit 635c3b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/animations/browser/src/render/web_animations/web_animations_driver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
import {AnimationPlayer, ɵStyleDataMap} from '@angular/animations';
99

10-
import {allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, camelCaseToDashCase, copyStyles, normalizeKeyframes} from '../../util';
10+
import {allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, camelCaseToDashCase, computeStyle, copyStyles, normalizeKeyframes} from '../../util';
1111
import {AnimationDriver} from '../animation_driver';
1212
import {containsElement, getParentElement, invokeQuery, validateStyleProperty, validateWebAnimatableStyleProperty} from '../shared';
1313
import {packageNonAnimatableStyles} from '../special_cased_styles';
@@ -50,7 +50,7 @@ export class WebAnimationsDriver implements AnimationDriver {
5050
}
5151

5252
computeStyle(element: any, prop: string, defaultValue?: string): string {
53-
return (window.getComputedStyle(element) as any)[prop] as string;
53+
return computeStyle(element, prop);
5454
}
5555

5656
animate(

0 commit comments

Comments
 (0)