« get me outta code hell

html: treat html.isBlank() as null in type: 'string' slots - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/html.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-08-15 14:04:08 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-08-15 14:04:08 -0300
commitef942bf281194c318dc306cb56f2058b9a600c7a (patch)
treee5956e2975c2f8d06092aff7a997f8a3e8902b7f /src/util/html.js
parent2e4757a4a3cd4ea004f7440c335c3ead898e6301 (diff)
html: treat html.isBlank() as null in type: 'string' slots
Diffstat (limited to 'src/util/html.js')
-rw-r--r--src/util/html.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/html.js b/src/util/html.js
index 6efedb31..73e08854 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -1713,6 +1713,10 @@ export class Template {
       if (providedValue instanceof Tag || providedValue instanceof Template) {
         return providedValue.toString();
       }
+
+      if (isBlank(providedValue)) {
+        return null;
+      }
     }
 
     if (providedValue !== null) {