diff --git a/chrome/content/zotero/xpcom/data/tags.js b/chrome/content/zotero/xpcom/data/tags.js index 4fd19186f2..9969e66fd8 100644 --- a/chrome/content/zotero/xpcom/data/tags.js +++ b/chrome/content/zotero/xpcom/data/tags.js @@ -290,16 +290,18 @@ Zotero.Tags = new function() { }.bind(this)); if (oldColorData) { - // Remove color from old tag - yield this.setColor(libraryID, oldName); - - // Add color to new tag - yield this.setColor( - libraryID, - newName, - oldColorData.color, - oldColorData.position - ); + yield Zotero.DB.executeTransaction(function* () { + // Remove color from old tag + yield this.setColor(libraryID, oldName); + + // Add color to new tag + yield this.setColor( + libraryID, + newName, + oldColorData.color, + oldColorData.position + ); + }.bind(this)); } });