Bug 1321274 - Remove usage of javascript String generics: chat/im. r?aleth
MozReview-Commit-ID: 9fUgGB1KGVA
--- a/chat/components/src/imAccounts.js
+++ b/chat/components/src/imAccounts.js
@@ -867,17 +867,17 @@ AccountsService.prototype = {
_observingAccountListChange: true,
_prefObserver: null,
observe: function(aSubject, aTopic, aData) {
if (aTopic != "nsPref:changed" || aData != kPrefMessengerAccounts ||
!this._observingAccountListChange)
return;
this._accounts =
- this._accountList.split(",").map(String.trim)
+ this._accountList.split(",").map(account => account.trim())
.filter(k => k.startsWith(kAccountKeyPrefix))
.map(k => parseInt(k.substr(kAccountKeyPrefix.length)))
.map(this.getAccountByNumericId, this)
.filter(a => a);
Services.obs.notifyObservers(this, "account-list-updated", null);
},
--- a/im/modules/ibCore.jsm
+++ b/im/modules/ibCore.jsm
@@ -20,17 +20,17 @@ var Core = {
"quit-application-granted"
],
get bundle() { return l10nHelper("chrome://instantbird/locale/core.properties"); },
initLibpurpleOverrides: function() {
let forcePurple = Services.prefs.getCharPref("chat.prpls.forcePurple")
.split(",")
- .map(String.trim)
+ .map(aPrplId => aPrplId.trim())
.filter(aPrplId => !!aPrplId);
if (!forcePurple.length)
return;
let catMan =
Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
for (let prplId of forcePurple) {
catMan.addCategoryEntry("im-protocol-plugin", prplId,