From ee287d17227ea29c45d1eb31ad9a4112edfbb193 Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Mon, 3 Aug 2020 22:28:14 +0200 Subject: [PATCH] Trivialized cookie and renamed a function --- client/src/components/global/navbar/navbar.vue | 8 +++----- client/src/components/spells/spells-list.vue | 16 ++++++++-------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/client/src/components/global/navbar/navbar.vue b/client/src/components/global/navbar/navbar.vue index c33f250..522147d 100644 --- a/client/src/components/global/navbar/navbar.vue +++ b/client/src/components/global/navbar/navbar.vue @@ -45,11 +45,9 @@ }, methods: { logoutUser() { - if (this.$cookies.get('U_') != null) { - this.$cookies.remove('U_') - this.$store.commit('logout') - this.$router.push('/') - } + this.$cookies.remove('U_') + this.$store.commit('logout') + this.$router.push('/') } } } diff --git a/client/src/components/spells/spells-list.vue b/client/src/components/spells/spells-list.vue index 8e93f4c..db2f115 100644 --- a/client/src/components/spells/spells-list.vue +++ b/client/src/components/spells/spells-list.vue @@ -42,7 +42,7 @@