Skip to content

Commit 056153c

Browse files
committedNov 9, 2015
fix(range-slider): Use lodash find instead of Array.prototype.find
1 parent 1f3cee4 commit 056153c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎widgets/range-slider/range-slider.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ let React = require('react');
22
let ReactDOM = require('react-dom');
33

44
let utils = require('../../lib/utils.js');
5+
let find = require('lodash/collection/find');
56
let autoHideContainerHOC = require('../../decorators/autoHideContainer');
67
let headerFooterHOC = require('../../decorators/headerFooter');
78

@@ -84,9 +85,7 @@ function rangeSlider({
8485
helper.search();
8586
},
8687
render({results, helper, templatesConfig}) {
87-
let facet = results.disjunctiveFacets.find(
88-
function(f) { return f.name === attributeName; }
89-
);
88+
let facet = find(results.disjunctiveFacets, {name: attributeName});
9089
let stats = facet.stats;
9190
let currentRefinement = this._getCurrentRefinement(helper);
9291

0 commit comments

Comments
 (0)
Please sign in to comment.