diff --git a/webapp/components/notifications/NotificationMenu/NotificationMenu.vue b/webapp/components/notifications/NotificationMenu/NotificationMenu.vue index 0b600a701..cf9cd4514 100644 --- a/webapp/components/notifications/NotificationMenu/NotificationMenu.vue +++ b/webapp/components/notifications/NotificationMenu/NotificationMenu.vue @@ -125,7 +125,15 @@ export default { const newNotifications = data.notifications.filter(newN => { return !this.displayedNotifications.find(oldN => this.equalNotification(newN, oldN)) }) - this.displayedNotifications = newNotifications.concat(this.displayedNotifications) + this.displayedNotifications = newNotifications + .concat(this.displayedNotifications) + .sort((a, b) => { + return a.createdAt === b.createdAt + ? 0 + : new Date(a.createdAt) < new Date(b.createdAt) + ? 1 + : -1 + }) this.updateOn = false return data.notifications },