diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-10-06 07:09:02 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-10-06 07:09:02 +0200 |
commit | 18473f1844a8230130e1fc23d7ebf7d33183316f (patch) | |
tree | 75d297ab7eac48e14af88e565dc1e19775de9df1 /services/sync/modules/record.js | |
parent | 0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (diff) | |
download | UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.gz UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.lz UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.tar.xz UXP-18473f1844a8230130e1fc23d7ebf7d33183316f.zip |
Update sync client for JS changes.
Diffstat (limited to 'services/sync/modules/record.js')
-rw-r--r-- | services/sync/modules/record.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/sync/modules/record.js b/services/sync/modules/record.js index 04ccd2dd2..e609ad1bc 100644 --- a/services/sync/modules/record.js +++ b/services/sync/modules/record.js @@ -10,10 +10,10 @@ this.EXPORTED_SYMBOLS = [ "Collection", ]; -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cr = Components.results; -const Cu = Components.utils; +var Cc = Components.classes; +var Ci = Components.interfaces; +var Cr = Components.results; +var Cu = Components.utils; const CRYPTO_COLLECTION = "crypto"; const KEYS_WBO = "keys"; @@ -85,7 +85,7 @@ WBORecord.prototype = { toJSON: function toJSON() { // Copy fields from data to be stringified, making sure payload is a string let obj = {}; - for (let [key, val] in Iterator(this.data)) + for (let [key, val] of Object.entries(this.data)) obj[key] = key == "payload" ? JSON.stringify(val) : val; if (this.ttl) obj.ttl = this.ttl; @@ -309,7 +309,7 @@ CollectionKeyManager.prototype = { // Return a sorted, unique array. changed.sort(); let last; - changed = [x for each (x in changed) if ((x != last) && (last = x))]; + changed = changed.filter(x => (x != last) && (last = x)); return {same: changed.length == 0, changed: changed}; }, |