mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): calculate hasHttpTransferCacheOptions later (#60605)
Prior to this commit, `hasHttpTransferCacheOptions` was calculated immediately after the `featuresKind` set was declared, which was always defaulted to `false`. PR Close #60605
This commit is contained in:
@@ -225,9 +225,6 @@ export function provideClientHydration(
|
||||
): EnvironmentProviders {
|
||||
const providers: Provider[] = [];
|
||||
const featuresKind = new Set<HydrationFeatureKind>();
|
||||
const hasHttpTransferCacheOptions = featuresKind.has(
|
||||
HydrationFeatureKind.HttpTransferCacheOptions,
|
||||
);
|
||||
|
||||
for (const {ɵproviders, ɵkind} of features) {
|
||||
featuresKind.add(ɵkind);
|
||||
@@ -237,6 +234,10 @@ export function provideClientHydration(
|
||||
}
|
||||
}
|
||||
|
||||
const hasHttpTransferCacheOptions = featuresKind.has(
|
||||
HydrationFeatureKind.HttpTransferCacheOptions,
|
||||
);
|
||||
|
||||
if (
|
||||
typeof ngDevMode !== 'undefined' &&
|
||||
ngDevMode &&
|
||||
|
||||
Reference in New Issue
Block a user