forgot empty arrays are truthy

This commit is contained in:
xenofem 2024-01-25 04:15:11 -05:00
parent b75bad995a
commit 61049f0d11

View file

@ -54,7 +54,7 @@ document.addEventListener('DOMContentLoaded', () => {
const creators = document.createElement('div');
creators.className = 'card-creators';
let creatorsInfo = `[${work.circle || ''}`;
if (work.authors) {
if (work.authors.length > 0) {
let authorList = work.authors[0];
for (let i = 1; i < work.authors.length; ++i) {
authorList += `, ${work.authors[i]}`;