diff --git a/src/stores/modalStore.js b/src/stores/modalStore.js index 4caef80c8..c71ef0243 100644 --- a/src/stores/modalStore.js +++ b/src/stores/modalStore.js @@ -107,6 +107,10 @@ export const useModalStore = defineStore('modal', () => { modalToClose = sideModal2; } + // it might have been replaced with other modal + if (!modalToClose) { + return; + } modalToClose.value.opened = false; // To keep the side modal animation nice, it needs to keep the component&props around for bit longer