Skip to content

Commit

Permalink
refactor: Update portal-config module to handle optional ref paramete…
Browse files Browse the repository at this point in the history
…r and remove unnecessary code
  • Loading branch information
Noggling committed Sep 30, 2024
1 parent ac41f95 commit c1dd083
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions client/packages/core/src/modules/portal-config/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ export const module: PortalConfig = {
configure: () => new PortalConfigConfigurator(),
initialize: async (args): Promise<IPortalConfigProvider> => {
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);
},
};

Expand All @@ -22,9 +20,3 @@ declare module '@equinor/fusion-framework-module' {
portalServices: PortalConfig;
}
}

declare global {
interface Window {
portalConfig: PortalConfigProvider;
}
}

0 comments on commit c1dd083

Please sign in to comment.