From: Mike Taylor Date: Fri, 28 Mar 2014 11:00:53 +0000 (+0000) Subject: Switch around code order so a local alias can be used more. X-Git-Tag: 1.0.0~1140 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=93a97e81c4865fd74176d04d896c426db44a1322;p=mkws-moved-to-github.git Switch around code order so a local alias can be used more. --- diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js index 34b66c0..2366614 100644 --- a/src/mkws-widgets.js +++ b/src/mkws-widgets.js @@ -87,7 +87,8 @@ mkws.registerWidgetType('Termlists', function() { } // no facets: this should never happen - if (!mkws.config.facets || mkws.config.facets.length == 0) { + var facets = mkws.config.facets; + if (!facets || facets.length == 0) { alert("onTerm called even though we have no facets: " + $.toJSON(data)); $(that.node).hide(); return; @@ -98,7 +99,6 @@ mkws.registerWidgetType('Termlists', function() { var acc = []; acc.push('
' + M('Termlists') + '
'); - var facets = mkws.config.facets; for (var i = 0; i < facets.length; i++) { if (facets[i] == "xtargets") {