From b401d829dbb4733dd21a98e4fee7aec9ce21200f Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 9 Mar 2023 21:24:45 +0100 Subject: [PATCH] remove a small warning --- pages/index.vue | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 5a01f421..e26c55ff 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -38,7 +38,7 @@ export default { this.$fetch() } }, - data ({ $store }) { + data () { return { mdiMagnify, mdiCloseCircle, isCurrentMonth: true, @@ -89,16 +89,18 @@ export default { created () { this.$root.$on('dayclick', this.dayChange) this.$root.$on('monthchange', this.monthChange) - this.storeUnsubscribe = this.$store.subscribeAction( { after: (action, state) => { - if (action.type === 'setFilter') { - if (this.filter.query && this.filter.query.length > 2) { - this.search() - } else { - this.tmpEvents = [] - this.$fetch() + if (process.client) { + this.storeUnsubscribe = this.$store.subscribeAction( { after: (action, state) => { + if (action.type === 'setFilter') { + if (this.filter.query && this.filter.query.length > 2) { + this.search() + } else { + this.tmpEvents = [] + this.$fetch() + } } - } - }}) + }}) + } }, destroyed () { this.$root.$off('dayclick')