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:
06be366
)
team.widget returns undefined is there are no widgets of the specified type.
author
Mike Taylor
<mike@indexdata.com>
Thu, 1 May 2014 14:59:06 +0000
(15:59 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Thu, 1 May 2014 14:59:06 +0000
(15:59 +0100)
src/mkws-team.js
patch
|
blob
|
history
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
ef216fc
..
4d65628
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-452,6
+452,9
@@
function team($, teamName) {
that.widget = function(type) {
var list = m_widgets[type];
+
+ if (!list)
+ return undefined;
if (list.length > 1) {
alert("widget('" + type + "') finds " + list.length + " widgets: using first");
}