addWidget registers its parameter w, not the function widget!
authorMike Taylor <mike@indexdata.com>
Tue, 15 Apr 2014 15:54:41 +0000 (16:54 +0100)
committerMike Taylor <mike@indexdata.com>
Tue, 15 Apr 2014 15:54:41 +0000 (16:54 +0100)
src/mkws-team.js

index 8872eb3..0ddc962 100644 (file)
@@ -744,7 +744,7 @@ function team($, teamName) {
 
     that.addWidget = function(w) {
         if (!m_widgets[w.type]) {
-            m_widgets[w.type] = widget;
+            m_widgets[w.type] = w;
             log("Registered '" + w.type + "' widget in team '" + m_teamName + "'");
         } else if (typeof(m_widgets[w.type]) !== 'number') {
             m_widgets[w.type] = 2;