diff --git a/pages/dashboard/notifications.vue b/pages/dashboard/notifications.vue index 10cc89ec0..d3bb4cc52 100644 --- a/pages/dashboard/notifications.vue +++ b/pages/dashboard/notifications.vue @@ -5,7 +5,7 @@
@@ -31,15 +31,17 @@
- +
@@ -71,14 +73,16 @@ export default { } }, methods: { - async performAction(notification, index) { + async performAction(notification, notificationIndex, actionIndex) { this.$nuxt.$loading.start() try { - if (typeof index !== 'undefined') { + if (actionIndex !== null) { const config = { - method: notification.actions[index].action_route[0].toLowerCase(), - url: `${notification.actions[index].action_route[1]}`, + method: notification.actions[ + actionIndex + ].action_route[0].toLowerCase(), + url: `${notification.actions[actionIndex].action_route[1]}`, headers: { Authorization: this.$auth.token, }, @@ -92,7 +96,7 @@ export default { this.$auth.headers ) - this.notifications.splice(index, 1) + this.notifications.splice(notificationIndex, 1) this.$store.dispatch('user/fetchNotifications', { force: true }) } catch (err) { this.$notify({