Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: unmount data listener

DarkPhoenix2704157201ae90d6
diff --git a/packages/nc-gui/composables/useCalendarViewStore.ts b/packages/nc-gui/composables/useCalendarViewStore.ts
index dd899e345c..31c8c47782 100644
--- a/packages/nc-gui/composables/useCalendarViewStore.ts
+++ b/packages/nc-gui/composables/useCalendarViewStore.ts
@@ -1257,7 +1257,9 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState(
)
onBeforeUnmount(() => {
- $ncSocket?.offMessage?.(activeDataListener.value)
+ if (activeDataListener.value) {
+ $ncSocket?.offMessage?.(activeDataListener.value)
+ }
})
return {