From 5be5ca94164719635790c70dcf3a37fd97744354 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 16 May 2024 01:41:55 -0400 Subject: [PATCH] Always return from `numDistinctFileAttachmentsForLabel()` once we're >1 --- chrome/content/zotero/xpcom/data/items.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js index ead810d4a8..4f0a034961 100644 --- a/chrome/content/zotero/xpcom/data/items.js +++ b/chrome/content/zotero/xpcom/data/items.js @@ -1873,12 +1873,14 @@ Zotero.Items = function() { if (item.key == foundKey) { continue; } - // More than 1 attachment found return MAX_ITEMS; } foundKey = item.key; num++; } + if (num >= MAX_ITEMS) { + break; + } } return num; };