diff --git a/public/src/templates.js b/public/src/templates.js
index 570f9a0e5b..9ccc06b073 100644
--- a/public/src/templates.js
+++ b/public/src/templates.js
@@ -62,7 +62,7 @@
 
 		if (!templates.cache[tpl]) {
 			fs.readFile(filename, function(err, html) {
-				templates.cache[tpl] = html.toString();
+				templates.cache[tpl] = (html || '').toString();
 				return fn(err, templates.parse(templates.cache[tpl], options));
 			});
 		} else {