Bug 1435655 - Ensure we properly initialize previousFailed and toFetch r?eoger
MozReview-Commit-ID: KT9tJCSuUGh
--- 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;