« get me outta code hell

content: transformContent: blank if no content - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-06-12 13:58:55 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-06-12 17:32:57 -0300
commitdd3052db4b15247e1096e2c6927da9633b24854f (patch)
tree69136312343cd2d74b745bf27a9f07f7ff56cb65 /src/content/dependencies
parent29cfb4b7b5787d32c915843c3fdc1200bca9284e (diff)
content: transformContent: blank if no content
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/transformContent.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js
index 84fbe361..ee2c3938 100644
--- a/src/content/dependencies/transformContent.js
+++ b/src/content/dependencies/transformContent.js
@@ -45,7 +45,7 @@ export default {
   sprawl(wikiData, content) {
     const find = bindFind(wikiData);
 
-    const parsedNodes = parseInput(content);
+    const parsedNodes = parseInput(content ?? '');
 
     return {
       nodes: parsedNodes
@@ -512,7 +512,11 @@ export default {
         addText(markedOutput.slice(parseFrom));
       }
 
-      return html.tags(tags, {[html.joinChildren]: ''});
+      return (
+        html.tags(tags, {
+          [html.joinChildren]: '',
+          [html.onlyIfContent]: true,
+        }));
     };
 
     if (slots.mode === 'inline') {