Added an additional check in stores.js to prevent a strict warning from appearing.
authorAtul Varma <varmaa@toolness.com>
Thu, 26 Jun 2008 16:27:54 -0700
changeset 44778 36934a5b6f5fa0d565c523eb09fe01377673a9cc
parent 44771 ecc6163e17aaeec265787783cbd99df3058cba29
child 44779 f7bf0ccac44f3f4525bbb2f5ed8461e70aab407a
push idunknown
push userunknown
push dateunknown
Added an additional check in stores.js to prevent a strict warning from appearing.
services/sync/modules/stores.js
--- a/services/sync/modules/stores.js
+++ b/services/sync/modules/stores.js
@@ -163,17 +163,18 @@ SnapshotStore.prototype = {
       // special-case guid changes
       let newGUID = command.data.GUID,
       oldGUID = command.GUID;
 
       this._data[newGUID] = this._data[oldGUID];
       delete this._data[oldGUID];
 
       for (let GUID in this._data) {
-        if (this._data[GUID].parentGUID == oldGUID)
+        if (("parentGUID" in this._data[GUID]) &&
+            (this._data[GUID].parentGUID == oldGUID))
           this._data[GUID].parentGUID = newGUID;
       }
     }
     for (let prop in command.data) {
       if (prop == "GUID")
         continue;
       this._data[command.GUID][prop] = command.data[prop];
     }