From 93a97e81c4865fd74176d04d896c426db44a1322 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 28 Mar 2014 11:00:53 +0000 Subject: [PATCH] Switch around code order so a local alias can be used more. --- src/mkws-widgets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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") { -- 1.7.10.4