projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
221c638
)
Invert guard within loadTemplate()
author
Mike Taylor
<mike@indexdata.com>
Thu, 23 Jan 2014 14:52:32 +0000
(14:52 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Thu, 23 Jan 2014 14:52:32 +0000
(14:52 +0000)
tools/htdocs/mkws.js
patch
|
blob
|
history
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
0ea7223
..
a9661a4
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-781,17
+781,16
@@
function _make_mkws_team($, teamName) {
function loadTemplate(name)
{
function loadTemplate(name)
{
- if (mkws['template' + name])
- return; // It's already been done
+ if (mkws['template' + name] === undefined) {
+ var source = $("#mkwsTemplate" + name).html();
+ if (!source) {
+ source = defaultTemplate(name);
+ }
- var source = $("#mkwsTemplate" + name).html();
- if (!source) {
- source = defaultTemplate(name);
+ var template = Handlebars.compile(source);
+ debug("compiled template '" + name + "'");
+ mkws['template' + name] = template;
}
}
-
- var template = Handlebars.compile(source);
- debug("compiled template '" + name + "'");
- mkws['template' + name] = template;
}
}