diff --git a/modules/EchofonSign.jsm b/modules/EchofonSign.jsm index 22a5d38..80664ed 100644 --- a/modules/EchofonSign.jsm +++ b/modules/EchofonSign.jsm @@ -160,7 +160,7 @@ EchofonSign.getSignatureForSyncServer = function(str) var com = Cc['@naan.net/twitterfox-sign;1'].getService(Ci.nsITwitterFoxSign); var sig = com.sign(str); var toHexString = function(charCode) { return ("0" + charCode.toString(16)).slice(-2); }; - return [toHexString(sig.charCodeAt(i)) for (i in sig)].join(""); + return sig.map((e) => toHexString(sig.charCodeAt(e))).join(""); } else { return signByLibrary(str); diff --git a/modules/EchofonSync.jsm b/modules/EchofonSync.jsm index 9787151..c962b57 100644 --- a/modules/EchofonSync.jsm +++ b/modules/EchofonSync.jsm @@ -364,7 +364,7 @@ EchofonSync.prototype = { return null; } var toHexString = function(charCode) { return ("0" + charCode.toString(16)).slice(-2); }; - return [toHexString(sig.charCodeAt(i)) for (i in sig)].join(""); + return sig.map((e) => toHexString(sig.charCodeAt(i))).join(""); }, onLoadSync: function(req, user, callback) {