« get me outta code hell

language: fix formatList on null/undefined - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/Language.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-05-23 21:00:00 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-05-23 21:00:00 -0300
commite11711bfe7f37190d082198a57862d700074f36d (patch)
tree25962b47bdda1548409dce32d7467805a617df10 /src/data/things/Language.js
parent2bf4ebb6886b134cf51b9f64b1d569a04ca0c444 (diff)
language: fix formatList on null/undefined
Diffstat (limited to 'src/data/things/Language.js')
-rw-r--r--src/data/things/Language.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/data/things/Language.js b/src/data/things/Language.js
index dc8c0368..f51894f1 100644
--- a/src/data/things/Language.js
+++ b/src/data/things/Language.js
@@ -803,11 +803,16 @@ export class Language extends Thing {
   }
 
   #formatListHelper(array, processFn) {
+    // Empty lists, null, and undefined are blank content.
+    if (empty(array) || array === null || array === undefined) {
+      return html.blank();
+    }
+
     // Blank items aren't for display.
     array = array.filter(item => !html.isBlank(item));
 
-    // Empty lists, null, and undefined are blank content.
-    if (empty(array) || array === null || array === undefined) {
+    // Empty lists are blank content.  (2, The Sequel)
+    if (empty(array)) {
       return html.blank();
     }