« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/content-function.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/content-function.js b/src/content-function.js
index f57b606a..729211f1 100644
--- a/src/content-function.js
+++ b/src/content-function.js
@@ -1,3 +1,5 @@
+import {Template} from '#html';
+
 import {
   annotateFunction,
   decorateErrorWithCause,
@@ -44,6 +46,10 @@ export default function contentFunction({
     throw new ContentFunctionSpecError(`Content functions with slots must specify html in extraDependencies`);
   }
 
+  if (slots) {
+    Template.validateSlotsDescription(slots);
+  }
+
   // Pass all the details to expectDependencies, which will recursively build
   // up a set of fulfilled dependencies and make functions like `relations`
   // and `generate` callable only with sufficient fulfilled dependencies.