From c1dd083e6b6a5c0c74acf36c2869ce19bc7d7f58 Mon Sep 17 00:00:00 2001 From: Christopher Berge Hove Date: Mon, 30 Sep 2024 11:08:22 +0200 Subject: [PATCH] refactor: Update portal-config module to handle optional ref parameter and remove unnecessary code --- .../packages/core/src/modules/portal-config/module.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/client/packages/core/src/modules/portal-config/module.ts b/client/packages/core/src/modules/portal-config/module.ts index 00191404..a16f5885 100644 --- a/client/packages/core/src/modules/portal-config/module.ts +++ b/client/packages/core/src/modules/portal-config/module.ts @@ -9,9 +9,7 @@ export const module: PortalConfig = { configure: () => new PortalConfigConfigurator(), initialize: async (args): Promise => { const config = await (args.config as PortalConfigConfigurator).createConfigAsync(args, args.ref); - const portalConfig = args.ref?.portalConfig || new PortalConfigProvider(config); - window['portalConfig'] = portalConfig; - return portalConfig; + return args.ref?.portalConfig || new PortalConfigProvider(config); }, }; @@ -22,9 +20,3 @@ declare module '@equinor/fusion-framework-module' { portalServices: PortalConfig; } } - -declare global { - interface Window { - portalConfig: PortalConfigProvider; - } -}