diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 66f520752..546f11263 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -346,7 +346,7 @@ var ZoteroPane = new function() setTimeout("document.getElementById('zotero-tb-search').inputField.select();", 1); var d = new Date(); - Zotero.purgeDataObjects(true); + Zotero.purgeDataObjects(); var d2 = new Date(); Zotero.debug("Purged data tables in " + (d2 - d) + " ms"); diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 566db27ad..f45f7a238 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -908,11 +908,16 @@ Zotero.Item.prototype.removeCreator = function(orderIndex) { this._loadCreators(); } - if (!this._creators[orderIndex]) { + var creator = this.getCreator(orderIndex); + if (!creator) { throw ('No creator exists at position ' + orderIndex + ' in Zotero.Item.removeCreator()'); } + if (creator.ref.countLinkedItems() == 1) { + Zotero.Prefs.set('purge.creators', true); + } + // Shift creator orderIndexes down, going to length+1 so we clear the last one for (var i=orderIndex, max=this._creators.length+1; i