From 4ba73dfbeca67a6640a7ec18ab5a63dcfe2c6640 Mon Sep 17 00:00:00 2001 From: Kalista Payne Date: Thu, 19 Dec 2024 15:32:23 -0600 Subject: [PATCH] fix(notifications): don't error on same page --- migrations/users/nye.js | 2 +- .../src/components/header/notifications/itemReceived.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/migrations/users/nye.js b/migrations/users/nye.js index 89ee34ac531..f3b98103beb 100644 --- a/migrations/users/nye.js +++ b/migrations/users/nye.js @@ -14,7 +14,7 @@ async function updateUser (user) { }; const data = { title: 'Happy New Year!', - destination: 'inventory/equipment', + destination: '/inventory/equipment', }; if (typeof user.items.gear.owned.head_special_nye2023 !== 'undefined') { diff --git a/website/client/src/components/header/notifications/itemReceived.vue b/website/client/src/components/header/notifications/itemReceived.vue index 6a2f458fe9c..e773a9d0110 100644 --- a/website/client/src/components/header/notifications/itemReceived.vue +++ b/website/client/src/components/header/notifications/itemReceived.vue @@ -41,7 +41,8 @@ export default { }, methods: { action () { - if (!this.notification || !this.notification.data) { + if (!this.notification || !this.notification.data + || this.notification.data.destination === this.$route.path) { return; } if (this.notification.data.destination.indexOf('backgrounds') !== -1) {