From 4e462b577d3b6368d1c90217fe702df47ed9fb49 Mon Sep 17 00:00:00 2001 From: Fahri Gedik Date: Wed, 30 Jul 2025 09:27:56 +0300 Subject: [PATCH] Refactor app initializer to use async function Simplifies the app initializer by making it an async function directly instead of returning an async IIFE. This improves readability and maintains the same initialization behavior. --- .../core/src/lib/providers/core-module-config.provider.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts b/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts index fa24f66e45..631f25217c 100644 --- a/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts +++ b/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts @@ -106,14 +106,11 @@ export function provideAbpCore(...features: CoreFeature[]) { headerName: 'RequestVerificationToken', }), ), - provideAppInitializer(() => { + provideAppInitializer(async () => { inject(LocalizationService); inject(LocalStorageListenerService); inject(RoutesHandler); - - return (async (): Promise => { - await getInitialData(); - })(); + await getInitialData(); }), LocaleProvider, CookieLanguageProvider,