The config value for facet_max_<...> can be a string or a number
[mkws-moved-to-github.git] / src / mkws-widget-termlists.js
index dc89504..acd9dcf 100644 (file)
@@ -32,7 +32,7 @@ mkws.registerWidgetType('Facet', function() {
   var name = that.config.facet;
   var ref = facetConfig[name] || [ "Unknown", 10, true ];
   var caption = this.config['facet_caption_' + name] || ref[0];
-  var max     = this.config['facet_max_' + name]     || ref[1];
+  var max     = parseInt(this.config['facet_max_' + name] || ref[1]);
   var pzIndex = ref[2] ? name : null;
 
   that.toString = function() {