diff --git a/chrome/content/zotero/xpcom/sync/syncLocal.js b/chrome/content/zotero/xpcom/sync/syncLocal.js index fefbd1d9d..03a4e807c 100644 --- a/chrome/content/zotero/xpcom/sync/syncLocal.js +++ b/chrome/content/zotero/xpcom/sync/syncLocal.js @@ -188,6 +188,11 @@ Zotero.Sync.Data.Local = { // Reset library if (index == 0) { + // This check happens before item data is loaded for syncing, so do it now, + // since the reset requires it + if (!library.getDataLoaded('item')) { + yield library.waitForDataLoad('item'); + } yield this.resetUnsyncedLibraryData(libraryID); return true; } @@ -201,6 +206,11 @@ Zotero.Sync.Data.Local = { // Reset library files if (index == 0) { + // This check happens before item data is loaded for syncing, so do it now, + // since the reset requires it + if (!library.getDataLoaded('item')) { + yield library.waitForDataLoad('item'); + } yield this.resetUnsyncedLibraryFiles(libraryID); return true; }