Skip to content

Commit 593cc8a

Browse files
thePunderWomanNothingEverHappens
authored andcommitted
fix(core): checks if body exists before continuing (#62768)
This fixes a case in which the document exists, but the body does not. PR Close #62768
1 parent a4a4f7f commit 593cc8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ 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
3537
typeof document.body.getAnimations === 'function';
3638

3739
const noOpAnimationComplete = () => {};

0 commit comments

Comments
 (0)