Skip to content

Commit 063b5e1

Browse files
thePunderWomanNothingEverHappens
authored andcommitted
fix(core): switch check to documentElement with chaining (angular#62773)
This fixes a situation where DOM checks may report null. PR Close angular#62773
1 parent 9562b63 commit 063b5e1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/render3/instructions/animation.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ const areAnimationSupported =
3232
(typeof ngServerMode === 'undefined' || !ngServerMode) &&
3333
typeof document !== 'undefined' &&
3434
// tslint:disable-next-line:no-toplevel-property-access
35-
typeof document.body !== 'undefined' &&
36-
// tslint:disable-next-line:no-toplevel-property-access
37-
typeof document.body.getAnimations === 'function';
35+
typeof document?.documentElement?.getAnimations === 'function';
3836

3937
const noOpAnimationComplete = () => {};
4038

0 commit comments

Comments
 (0)