Bug 1435655 - Ensure we properly initialize previousFailed and toFetch r?eoger draft
authorThom Chiovoloni <tchiovoloni@mozilla.com>
Mon, 05 Feb 2018 11:39:30 -0500
changeset 751154 330831d8dee40a61c4d2a954f42d481a44310edd
parent 749604 3804441e575c9f46fcb03894de3c780eeae7197f
push id97881
push userbmo:tchiovoloni@mozilla.com
push dateMon, 05 Feb 2018 16:40:02 +0000
reviewerseoger
bugs1435655
milestone60.0a1
Bug 1435655 - Ensure we properly initialize previousFailed and toFetch r?eoger MozReview-Commit-ID: KT9tJCSuUGh
services/sync/modules/engines.js
--- a/services/sync/modules/engines.js
+++ b/services/sync/modules/engines.js
@@ -832,17 +832,17 @@ SyncEngine.prototype = {
 
   // Which sortindex to use when retrieving records for this engine.
   _defaultSort: undefined,
 
   _metadataPostProcessor(json) {
     if (Array.isArray(json)) {
       // Pre-`JSONFile` storage stored an array, but `JSONFile` defaults to
       // an object, so we wrap the array for consistency.
-      return { ids: json };
+      json = { ids: json };
     }
     if (!json.ids) {
       json.ids = [];
     }
     // The set serializes the same way as an array, but offers more efficient
     // methods of manipulation.
     json.ids = new SerializableSet(json.ids);
     return json;