Update webapp/components/notifications/NotificationMenu/NotificationMenu.vue

Co-Authored-By: Robert Schäfer <git@roschaefer.de>
This commit is contained in:
Wolfgang Huß 2019-09-23 13:46:08 +02:00
parent 9d884d6fdc
commit f4c8dec6d5

View File

@ -105,7 +105,9 @@ export default {
return (this.notifications || []).length
},
unreadNotifications() {
let countUnread = 0
let countUnread = this.notifications.reduce((notification, counter) => {
return (notification.read) ? counter : counter +1
})
if (this.notifications) {
this.notifications.forEach(notification => {
if (!notification.read) countUnread++