diff --git a/services/sync/modules/trackers.js b/services/sync/modules/trackers.js index 8bd6c05ad5c9..56b5b1f84ad1 100644 --- a/services/sync/modules/trackers.js +++ b/services/sync/modules/trackers.js @@ -166,6 +166,10 @@ Tracker.prototype = { addChangedID: function T_addChangedID(id) { if (!this.enabled) return; + if (!id) { + this._log.warn("Attempted to add undefined ID to tracker"); + return; + } this._log.debug("Adding changed ID " + id); if (!this.changedIDs[id]) { this.changedIDs[id] = true; @@ -176,6 +180,10 @@ Tracker.prototype = { removeChangedID: function T_removeChangedID(id) { if (!this.enabled) return; + if (!id) { + this._log.warn("Attempted to remove undefined ID from tracker"); + return; + } this._log.debug("Removing changed ID " + id); if (this.changedIDs[id]) { delete this.changedIDs[id];