diff --git a/packages/client/src/components/notification.vue b/packages/client/src/components/notification.vue index 5b5851c482..2791096de3 100644 --- a/packages/client/src/components/notification.vue +++ b/packages/client/src/components/notification.vue @@ -122,8 +122,8 @@ export default defineComponent({ connection.on('readAllNotifications', () => readObserver.disconnect()); onUnmounted(() => { - if (readObserver) readObserver.disconnect(); - if (connection) connection.dispose(); + readObserver.disconnect(); + connection.dispose(); }); } });