mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 22:37:50 +00:00
(No bug) Replace misuse of Array.some() r=kmag
MozReview-Commit-ID: 5DpG14EcJCE
This commit is contained in:
parent
b53651b1af
commit
d5d2ca90b7
@ -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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user