(No bug) Replace misuse of Array.some() r=kmag

MozReview-Commit-ID: 5DpG14EcJCE
This commit is contained in:
Andrew Swan 2016-12-01 14:54:47 -08:00
parent b53651b1af
commit d5d2ca90b7

View File

@ -259,10 +259,8 @@ PopupNotifications.prototype = {
* notification exists.
*/
getNotification: function PopupNotifications_getNotification(id, browser) {
let n = null;
let notifications = this._getNotificationsForBrowser(browser || this.tabbrowser.selectedBrowser);
notifications.some(x => x.id == id && (n = x));
return n;
return notifications.find(x => x.id == id) || null;
},
/**