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
This commit is contained in:
Dan Stillman 2021-10-18 17:48:36 -04:00
parent a07c052cf0
commit 5f61ac23aa

View file

@ -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'),