mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
fix(notifications): don't error on same page
This commit is contained in:
@@ -14,7 +14,7 @@ async function updateUser (user) {
|
|||||||
};
|
};
|
||||||
const data = {
|
const data = {
|
||||||
title: 'Happy New Year!',
|
title: 'Happy New Year!',
|
||||||
destination: 'inventory/equipment',
|
destination: '/inventory/equipment',
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof user.items.gear.owned.head_special_nye2023 !== 'undefined') {
|
if (typeof user.items.gear.owned.head_special_nye2023 !== 'undefined') {
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
action () {
|
action () {
|
||||||
if (!this.notification || !this.notification.data) {
|
if (!this.notification || !this.notification.data
|
||||||
|
|| this.notification.data.destination === this.$route.path) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.notification.data.destination.indexOf('backgrounds') !== -1) {
|
if (this.notification.data.destination.indexOf('backgrounds') !== -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user