Skip to content

Node.js based forum software built for the modern web

handle if invalid tpl is passed in

psychobunnya150b2c6f70d
diff --git a/public/src/templates.js b/public/src/templates.js
index 942bb46311..eacef3aa3f 100644
--- a/public/src/templates.js
+++ b/public/src/templates.js
@@ -17,6 +17,7 @@
obj = registerGlobals(obj || {});
bind = bind ? Math.random() : false;
+ template = template.toString() || '';
if (bind) {
obj.__template = template;