www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 51edc5ad167d8852b061626063f98e37c7125173
parent e4f49588c0af7c7e6e281bc69e4b59b9c64f47fb
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun, 13 Jul 2008 07:31:20 +0000

Removed incorrect check causing "Local [object] 1 not in update array" error

The remote object could legitimately not have been updated locally since the last sync if the server data was cleared and synched from a different client, potentially resulting in a different key condition on sync. The two sides should now be properly merged (at least in theory).



Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -1363,12 +1363,13 @@ Zotero.Sync.Server.Data = new function() { obj.save(); // Update id in local updates array + // + // Object might not appear in local update array if server + // data was cleared and synched from another client var index = uploadIDs.updated[types].indexOf(oldID); - if (index == -1) { - throw ("Local " + type + " " + oldID + " not in " - + "update array when changing id"); + if (index != -1) { + uploadIDs.updated[types][index] = newID; } - uploadIDs.updated[types][index] = newID; // Update id in local deletions array for (var i in uploadIDs.deleted[types]) {