diff --git a/CHANGELOG b/CHANGELOG index 64fd5d0658ce378fb368478b94680d37ff860f35..7ef775f09e415914ee805fb939ed53a99c361834 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +minerva-front (18.2.0) stable; urgency=medium + * Bug fix: passing invalid overlay in the url params threw an error (#353) + +-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 06 Mar 2025 17:00:00 +0200 + minerva-front (18.1.1) stable; urgency=medium * Bug fix: styling of notes reset only for a href (#334) * Bug fix: disable searching for chemicals in projects without disease (#347) diff --git a/src/redux/overlayBioEntity/overlayBioEntity.thunk.ts b/src/redux/overlayBioEntity/overlayBioEntity.thunk.ts index f726bd8fff76200318f7e4f0b40c64bfb985eb3e..001dc7526b8b7572e2613b0e02deed54a325a3bc 100644 --- a/src/redux/overlayBioEntity/overlayBioEntity.thunk.ts +++ b/src/redux/overlayBioEntity/overlayBioEntity.thunk.ts @@ -5,6 +5,7 @@ import { OverlayBioEntityRender } from '@/types/OLrendering'; import { PluginsEventBus } from '@/services/pluginsManager/pluginsEventBus'; import { ThunkConfig } from '@/types/store'; import { getError } from '@/utils/error-report/getError'; +import { showToast } from '@/utils/showToast'; import { getValidOverlayBioEntities, parseOverlayBioEntityToOlRenderingFormat, @@ -101,9 +102,13 @@ export const getInitOverlays = createAsyncThunk< if (eventData) { PluginsEventBus.dispatchEvent('onShowOverlay', eventData); + dispatch(getOverlayBioEntityForAllModels({ overlayId: id })); + } else { + showToast({ + type: 'error', + message: `Overlay passed in the url does not exist (overlayId: ${id})`, + }); } - - dispatch(getOverlayBioEntityForAllModels({ overlayId: id })); }); } catch (error) { return Promise.reject(getError({ error, prefix: INIT_OVERLAYS_ERROR_PREFIX }));