zotero: fix library dialog empty when collection has notes

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie96550faaf3dc23e0aff0c289a38f717c6624e6f
This commit is contained in:
Pranam Lashkari 2022-12-05 18:23:32 +05:30 committed by Andras Timar
parent 777c7edf96
commit fe02dbbbd3

View file

@ -145,7 +145,7 @@ L.Control.Zotero = L.Control.extend({
fillItems: function (items) {
for (var iterator = 0; iterator < items.length; ++iterator) {
var creatorArray = [];
for (var creator = 0; creator < items[iterator].data.creators.length; ++creator) {
for (var creator = 0; items[iterator].data.creators && creator < items[iterator].data.creators.length; ++creator) {
creatorArray.push(items[iterator].data.creators[creator].firstName + ' ' + items[iterator].data.creators[creator].lastName);
}
var creatorString = creatorArray.join(', ');