Skip to content

Commit c291537

Browse files
committed
refactor(devtools): remove unnecessary async from serializeTransferState
Remove unnecessary `async`/`Promise<void>` from `serializeTransferState` and the redundant `async () =>` wrapper in `provideAppInitializer` β€” the function contains no async operations, so this is a zero behavior change cleanup.
1 parent fd6ef34 commit c291537

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

β€Ždevtools/src/app/app.config.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const appConfig: ApplicationConfig = {
4141
useClass: DemoApplicationEnvironment,
4242
},
4343
// We simulate a transfer state created by the server-side rendering.
44-
provideAppInitializer(async () => serializeTransferState()),
44+
provideAppInitializer(() => serializeTransferState()),
4545
provideSettings(),
4646
],
4747
};

β€Ždevtools/src/app/transfer-state.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {APP_ID, DOCUMENT, inject, makeStateKey, TransferState} from '@angular/co
1212
/**
1313
* This function serializes the transfer state into the DOM.
1414
*/
15-
export async function serializeTransferState(): Promise<void> {
15+
export function serializeTransferState(): void {
1616
const doc = inject(DOCUMENT);
1717
const appId = inject(APP_ID);
1818
const transferState = inject(TransferState);

0 commit comments

Comments
Β (0)