loadTemplate returns null when defaultTemplate can't come up with
authorMike Taylor <mike@indexdata.com>
Tue, 10 Jun 2014 15:45:54 +0000 (16:45 +0100)
committerMike Taylor <mike@indexdata.com>
Tue, 10 Jun 2014 15:45:54 +0000 (16:45 +0100)
anything.

src/mkws-team.js

index 02dc5ac..f4e0c88 100644 (file)
@@ -413,6 +413,7 @@ function team($, teamName) {
         source = mkws.defaultTemplate(name);
       }
 
+      if (!source) return null;
       template = Handlebars.compile(source);
       log("compiled template '" + name + "'");
       m_template[name] = template;