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:
38f270f
)
Fix loadTemplate to handle null return from widgetNode.
author
Mike Taylor
<mike@indexdata.com>
Wed, 16 Apr 2014 11:24:28 +0000
(12:24 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 16 Apr 2014 11:24:28 +0000
(12:24 +0100)
src/mkws-team.js
patch
|
blob
|
history
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
f956e55
..
1983508
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-641,12
+641,15
@@
function team($, teamName) {
if (template === undefined) {
// Fall back to generic template if there is no team-specific one
+ var source;
var node = widgetNode("Template_" + name);
- if (!node.length) {
+ if (!node) {
node = widgetNode("Template_" + name, "ALL");
}
+ if (node) {
+ source = node.html();
+ }
- var source = node.html();
if (!source) {
source = defaultTemplate(name);
}