diff --git a/.changeset/hip-mugs-begin.md b/.changeset/hip-mugs-begin.md new file mode 100644 index 000000000..27420d491 --- /dev/null +++ b/.changeset/hip-mugs-begin.md @@ -0,0 +1,8 @@ +--- +'@equinor/fusion-framework-module-navigation': patch +'@equinor/fusion-framework-module-ag-grid': patch +--- + +Fixed reference check in navigation module and ag-grid module. + +hotfix for [PR-2425](https://github.com/equinor/fusion-framework/pull/2425) diff --git a/packages/cli/vite.config.ts b/packages/cli/vite.config.ts index a5d60776f..eff99b86d 100644 --- a/packages/cli/vite.config.ts +++ b/packages/cli/vite.config.ts @@ -13,5 +13,11 @@ export default defineConfig({ build: { outDir: fileURLToPath(new URL('./dist/bin/public', import.meta.url)), emptyOutDir: true, + // TODO: keep for debug purposes + // minify: false, + // terserOptions: { + // mangle: false, + // compress: false, + // }, }, }); diff --git a/packages/modules/ag-grid/src/module.ts b/packages/modules/ag-grid/src/module.ts index ea158dbf0..604e79f44 100644 --- a/packages/modules/ag-grid/src/module.ts +++ b/packages/modules/ag-grid/src/module.ts @@ -11,7 +11,7 @@ export type AgGridModule = Module<'agGrid', IAgGridProvider, IAgGridConfigurator export const module: AgGridModule = { name: 'agGrid', - configure: (ref: ModulesInstanceType<[AgGridModule]>) => { + configure: (ref?: ModulesInstanceType<[AgGridModule]>) => { const config = new AgGridConfigurator(); if (ref?.agGrid) { config.licenseKey = ref.agGrid.licenseKey; diff --git a/packages/modules/navigation/src/module.ts b/packages/modules/navigation/src/module.ts index b19d413fb..1e6dcdc44 100644 --- a/packages/modules/navigation/src/module.ts +++ b/packages/modules/navigation/src/module.ts @@ -23,10 +23,10 @@ export type NavigationModule = Module< export const module: NavigationModule = { version: new SemanticVersion(version), name: moduleKey, - configure: (ref?: unknown) => { + configure: (ref?: ModuleInstance) => { const configurator = new NavigationConfigurator(); - if (ref) { - configurator.history = (ref as ModuleInstance).navigation.navigator; + if (ref?.navigation) { + configurator.history = ref.navigation.navigator; } return configurator; },