mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
This commit is contained in:
parent
a4a4f7f850
commit
593cc8a368
1 changed files with 2 additions and 0 deletions
|
|
@ -32,6 +32,8 @@ const areAnimationSupported =
|
|||
(typeof ngServerMode === 'undefined' || !ngServerMode) &&
|
||||
typeof document !== 'undefined' &&
|
||||
// tslint:disable-next-line:no-toplevel-property-access
|
||||
typeof document.body !== 'undefined' &&
|
||||
// tslint:disable-next-line:no-toplevel-property-access
|
||||
typeof document.body.getAnimations === 'function';
|
||||
|
||||
const noOpAnimationComplete = () => {};
|
||||
|
|
|
|||
Loading…
Reference in a new issue