diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index 05726c563..67358f5ed 100644 --- a/chrome/content/zotero/xpcom/fulltext.js +++ b/chrome/content/zotero/xpcom/fulltext.js @@ -261,6 +261,10 @@ Zotero.Fulltext = Zotero.FullText = new function(){ var indexString = Zotero.Promise.coroutine(function* (text, charset, itemID, stats, version, synced) { var words = this.semanticSplitter(text, charset); + while (Zotero.DB.inTransaction()) { + yield Zotero.DB.waitForTransaction('indexString()'); + } + yield Zotero.DB.executeTransaction(function* () { this.clearItemWords(itemID, true); yield indexWords(itemID, words, stats, version, synced);