From 61049f0d11e19b8b0b47a95d69390e1b9725f3b4 Mon Sep 17 00:00:00 2001 From: xenofem Date: Thu, 25 Jan 2024 04:15:11 -0500 Subject: [PATCH] forgot empty arrays are truthy --- dlibrary/static/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlibrary/static/index.js b/dlibrary/static/index.js index 409e537..813b33a 100644 --- a/dlibrary/static/index.js +++ b/dlibrary/static/index.js @@ -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]}`;