commit d9eb8ff3c3a0deca0817e3b2012b808880a575ee parent 1bb6217ec13c406e24357ec9f0abf2286dbe4b04 Author: Dan Stillman <dstillman@zotero.org> Date: Wed, 14 Jun 2017 07:52:17 -0400 Fix "o is undefined" sync error Diffstat:
| M | chrome/content/zotero/xpcom/sync/syncEngine.js | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js @@ -1643,7 +1643,9 @@ Zotero.Sync.Data.Engine.prototype._checkObjectUploadError = Zotero.Promise.corou let id = parentItem.id; // If parent item isn't already in queue, mark it as unsynced and add it - if (!queue.find(o => o.id == id) && !batch.find(o => o.id == id)) { + if (!queue.find(o => o.id == id) + // TODO: Don't use 'delete' on batch, which results in undefineds + && !batch.find(o => o && o.id == id)) { yield Zotero.Sync.Data.Local.markObjectAsUnsynced(parentItem); Zotero.logError(`Adding parent item ${data.parentItem} to upload queue`); queue.push({