Move member declarations ahead of code.
authorMike Taylor <mike@indexdata.com>
Thu, 23 Jan 2014 16:09:13 +0000 (16:09 +0000)
committerMike Taylor <mike@indexdata.com>
Thu, 23 Jan 2014 16:09:13 +0000 (16:09 +0000)
tools/htdocs/mkws.js

index 4bbd506..b294302 100644 (file)
@@ -143,15 +143,6 @@ if (mkws_config == null || typeof mkws_config != 'object') {
 
 // wrapper for jQuery lib
 function _make_mkws_team($, teamName) {
-    // if (console && console.log) // disabled, will fail in IE8
-    // console.log("run _make_mkws_team(" + (teamName ? teamName : "") + ")");
-
-    // call this function only once
-    if (mkws.init) {
-       alert("_make_mkws_team() called twice: how did that happen?!");
-       return;
-    }
-
     var m_sort = 'relevance';
     var m_filters = [];
     var curPage = 1;
@@ -171,6 +162,16 @@ function _make_mkws_team($, teamName) {
     };
 
 
+    // call this function only once
+    if (mkws.init) {
+       alert("_make_mkws_team() called twice: how did that happen?!");
+       return;
+    }
+
+    // if (console && console.log) // disabled, will fail in IE8
+    // console.log("run _make_mkws_team(" + (teamName ? teamName : "") + ")");
+
+
     // Needs to be defined inside _make_mkws_team() so it can see m_debug_time
     mkws.debug_function = function (string) {
        if (!mkws.debug_level)