From 7c9e215f0b380347a8f740e0e626584dadfb289a Mon Sep 17 00:00:00 2001 From: Gator Date: Thu, 13 Jan 2022 14:10:44 +0100 Subject: [PATCH] forgot case when none is set --- src/components/MenuRow.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/MenuRow.vue b/src/components/MenuRow.vue index 8cef067..234be17 100644 --- a/src/components/MenuRow.vue +++ b/src/components/MenuRow.vue @@ -35,13 +35,11 @@ export default { updateActiveMenu(event) { const elem = event.target const value = elem.id - this.$store.commit('setActiveMenu', value) + if (value == this.activeMenu) + this.$store.commit('setActiveMenu', "") + else + this.$store.commit('setActiveMenu', value) }, - isActive(event) { - const elem = event.target - if (elem.id === this.activeMenu) return true - return false - } } }