« 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/static/js/client.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/static/js/client.js b/src/static/js/client.js
index 733e4586..8b470832 100644
--- a/src/static/js/client.js
+++ b/src/static/js/client.js
@@ -237,6 +237,10 @@ function cssProp(el, ...args) {
 }
 
 function templateContent(el) {
+  if (el === null) {
+    return null;
+  }
+
   if (el?.nodeName !== 'TEMPLATE') {
     throw new Error(`Expected a <template> element`);
   }