diff --git a/src/client/components/notification.vue b/src/client/components/notification.vue index 3c6b8524ea..4fde7d3748 100644 --- a/src/client/components/notification.vue +++ b/src/client/components/notification.vue @@ -112,8 +112,10 @@ export default Vue.extend({ }, beforeDestroy() { - if (!this.notification.isRead) this.readObserver.unobserve(this.$el); - this.connection.dispose(); + if (!this.notification.isRead) { + this.readObserver.unobserve(this.$el); + this.connection.dispose(); + } }, methods: {