From 16e3e053d49b41ef6d7bfb33906f517cf114f7c6 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 9 Mar 2021 15:20:48 +0100 Subject: [PATCH] Make sure rawData is an array before using it --- notifications/js/notificationajaxpopup.js | 1 + 1 file changed, 1 insertion(+) diff --git a/notifications/js/notificationajaxpopup.js b/notifications/js/notificationajaxpopup.js index bd824a3024..62e6e93d6b 100644 --- a/notifications/js/notificationajaxpopup.js +++ b/notifications/js/notificationajaxpopup.js @@ -656,6 +656,7 @@ notifications.prototype.append = function(_rawData, _browser_notify, _total) { var hasUnseen = []; + _rawData = _rawData || []; // Dont process the data if they're the same as it could get very expensive to // proccess html their content. if (_currentRawData.length>0 && _currentRawData.length == _rawData.length) return;