Skip to content

Commit

Permalink
fix(range-slider): Use lodash find instead of Array.prototype.find
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelastic committed Nov 9, 2015
1 parent 1f3cee4 commit 056153c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions widgets/range-slider/range-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ let React = require('react');
let ReactDOM = require('react-dom');

let utils = require('../../lib/utils.js');
let find = require('lodash/collection/find');
let autoHideContainerHOC = require('../../decorators/autoHideContainer');
let headerFooterHOC = require('../../decorators/headerFooter');

Expand Down Expand Up @@ -84,9 +85,7 @@ function rangeSlider({
helper.search();
},
render({results, helper, templatesConfig}) {
let facet = results.disjunctiveFacets.find(
function(f) { return f.name === attributeName; }
);
let facet = find(results.disjunctiveFacets, {name: attributeName});
let stats = facet.stats;
let currentRefinement = this._getCurrentRefinement(helper);

Expand Down

0 comments on commit 056153c

Please sign in to comment.