From 18473f1844a8230130e1fc23d7ebf7d33183316f Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 6 Oct 2018 07:09:02 +0200 Subject: Update sync client for JS changes. --- services/sync/modules/record.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'services/sync/modules/record.js') 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}; }, -- cgit v1.2.3