diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js index 87a07ad54..763028804 100644 --- a/chrome/content/zotero/xpcom/server_connector.js +++ b/chrome/content/zotero/xpcom/server_connector.js @@ -263,10 +263,13 @@ Zotero.Server.Connector.SaveSession.prototype._updateRecents = function () { } // Otherwise add this target to the end if (!sessionFound) { - recents.push({ - id: targetID, - sessionID: this.id - }); + recents + // Remove this target from the list if it's there from another session + .filter(r => r.id != targetID) + .concat({ + id: targetID, + sessionID: this.id + }); } recents = recents.slice(-1 * numRecents); Zotero.Prefs.set('recentSaveTargets', JSON.stringify(recents));