Fix potential error on retracted item modification
If a retracted item was in the trash at startup or when detected and there were no other retracted items in the library, an error would occur if the item was modified.
This commit is contained in:
parent
c1ab361c92
commit
94795095f2
1 changed files with 4 additions and 0 deletions
|
@ -234,6 +234,10 @@ Zotero.Retractions = {
|
|||
},
|
||||
|
||||
_removeLibraryRetractedItem: async function (libraryID, itemID) {
|
||||
// Might not exist if retracted item was in trash at startup or when detected
|
||||
if (!this._retractedItemsByLibrary[libraryID]) {
|
||||
return;
|
||||
}
|
||||
this._retractedItemsByLibrary[libraryID].delete(itemID);
|
||||
await this._updateLibraryRetractions(libraryID);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue