- if (node) {
- source = node.html();
- }
-
- // If the template is not defined in HTML, check the following
- // in order: template registered in the team by a widget;
- // fallback string provided on this invocation; global default.
- if (!source) {
- source = m_templateText[name];
- }
- if (!source) {
- source = fallbackString;
+ if (node) source = node.html();
+ if (!source) source = m_templateText[name];
+ if (source) {
+ template = Handlebars.compile(source);
+ log("compiled template '" + name + "'");