Skip to content

Commit

Permalink
fix(slider): hide slider if when no hits/matches
Browse files Browse the repository at this point in the history
fixes #107
  • Loading branch information
vvo committed Sep 22, 2015
1 parent 45b8908 commit 31e4a80
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions widgets/range-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ function rangeSlider({
},
render({results, helper}) {
var stats = results.getFacetStats(facetName);

var currentRefinement = this._getCurrentRefinement(helper);

if (!stats) {
React.render(<div/>, containerNode);
return;
}

React.render(
<Slider
start={[currentRefinement.min, currentRefinement.max]}
Expand Down

0 comments on commit 31e4a80

Please sign in to comment.