From 5f61ac23aa1bdc6e9906beb4c2d582c7bec53f88 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 18 Oct 2021 17:48:36 -0400 Subject: [PATCH] Don't include non-regular items in one-off bibliographies Applies to "Create Bibliography from Collection" and "Create Bibliography from Items". Quick Copy already got this right. https://forums.zotero.org/discussion/92305/sticky-notes-showing-in-bibliography --- chrome/content/zotero/fileInterface.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index 933668e18e..2317b71c86 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -705,15 +705,9 @@ var Zotero_File_Interface = new function() { * Shows bibliography options and creates a bibliography */ async function _doBibliographyOptions(name, items) { - // make sure at least one item is not a standalone note or attachment - var haveRegularItem = false; - for (let item of items) { - if (item.isRegularItem()) { - haveRegularItem = true; - break; - } - } - if (!haveRegularItem) { + // Limit to regular items + items = items.filter(item => item.isRegularItem()); + if (!items.length) { Zotero.alert( null, Zotero.getString('general.error'),