From 8182041526d84ad1a09f3eafbaf141d26f18f48c Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 3 Jul 2019 16:29:45 +0200 Subject: [PATCH] Remove ES6 code not working on IE --- www/notifications/inner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/notifications/inner.js b/www/notifications/inner.js index c5e10b761..2d8e382dd 100644 --- a/www/notifications/inner.js +++ b/www/notifications/inner.js @@ -87,9 +87,9 @@ define([ var addArchivedNotification = function (data) { // if the type is allowed if (data.content.archived && notifsAllowedTypes.indexOf(data.content.msg.type) !== -1) { - var isDataUnread = unreadData.findIndex(function (ud) { + var isDataUnread = unreadData.some(function (ud) { return ud.content.hash === data.content.hash; - }) !== -1; + }); notifsData.push(data); var el = common.mailbox.createElement(data); var time = new Date(data.content.time);