Target selector: Don't lose recent targets when saving to same target
A target could fill up the list from different sessions, pushing other recents out.
This commit is contained in:
parent
7d424f6d12
commit
222bb5bad4
|
@ -263,7 +263,10 @@ Zotero.Server.Connector.SaveSession.prototype._updateRecents = function () {
|
||||||
}
|
}
|
||||||
// Otherwise add this target to the end
|
// Otherwise add this target to the end
|
||||||
if (!sessionFound) {
|
if (!sessionFound) {
|
||||||
recents.push({
|
recents
|
||||||
|
// Remove this target from the list if it's there from another session
|
||||||
|
.filter(r => r.id != targetID)
|
||||||
|
.concat({
|
||||||
id: targetID,
|
id: targetID,
|
||||||
sessionID: this.id
|
sessionID: this.id
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user