Skip to content

Commit 9a2295f

Browse files
JeanMecheatscott
authored andcommitted
refactor(core): Remove zone assertion from hydration cleanup. (#55214)
In zoneless apps with hydration, this assertion was throwing. Fixes #52160 PR Close #55214
1 parent d0ae556 commit 9a2295f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • packages/core/src/hydration

packages/core/src/hydration/api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,10 @@ export function withDomHydration(): EnvironmentProviders {
188188
// The timing is similar to when we start the serialization process
189189
// on the server.
190190
//
191-
// Note: the cleanup task *MUST* be scheduled within the Angular zone
191+
// Note: the cleanup task *MUST* be scheduled within the Angular zone in Zone apps
192192
// to ensure that change detection is properly run afterward.
193193
whenStableWithTimeout(appRef, injector).then(() => {
194-
NgZone.assertInAngularZone();
195194
cleanupDehydratedViews(appRef);
196-
197195
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
198196
printHydrationStats(injector);
199197
}

0 commit comments

Comments
 (0)