« get me outta code hell

infra: html: make deeper layers of Template content translucent - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-02 17:44:10 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-02 17:44:48 -0300
commited55527ca510cd93bb035e3466e30ed6197928d9 (patch)
tree8d5e5ac56c0a0cc805aa8aae9c7daf8c92c6fa34 /src/util
parentfe0fc015b5ffb3d8834b8ccd4891a373b380f363 (diff)
infra: html: make deeper layers of Template content translucent
Diffstat (limited to 'src/util')
-rw-r--r--src/util/html.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/util/html.js b/src/util/html.js
index b49cce03..26dd6495 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -785,7 +785,13 @@ export class Template {
       slots[slotName] = this.getSlotValue(slotName);
     }
 
-    return this.description.content(slots);
+    // Get outta here with that recursive Template bollocks!
+    const content = this.description.content(slots);
+    if (content instanceof Template) {
+      return content.content;
+    } else {
+      return content;
+    }
   }
 
   set description(_value) {