From 3a26ce3bb1d9c39d91df272031ab3b712dfcc9e9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 5 Mar 2025 04:45:17 -0500 Subject: [PATCH] Avoid `args is undefined` logged error in file sync tests --- chrome/content/zotero/xpcom/storage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index de448ba37f..aaad00fc6e 100644 --- a/chrome/content/zotero/xpcom/storage.js +++ b/chrome/content/zotero/xpcom/storage.js @@ -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" });