Avoid args is undefined logged error in file sync tests

This commit is contained in:
Dan Stillman 2025-03-05 04:45:17 -05:00
parent 1f401f0897
commit 3a26ce3bb1

View file

@ -78,6 +78,10 @@ Zotero.Sync.Storage = new function () {
var libraryID, key;
[libraryID, key] = libraryKey.split("/");
var item = Zotero.Items.getByLibraryAndKey(libraryID, key);
// Item may not longer exist in tests
if (Zotero.test && !item) {
return;
}
// TODO: yield or switch to queue
Zotero.Notifier.trigger('redraw', 'item', item.id, { column: "hasAttachment" });