Skip to content

Commit

Permalink
fix(getRefinements): a name should be a string
Browse files Browse the repository at this point in the history
+ ignore a new react plugin rule (no multi comp)
  • Loading branch information
vvo committed Dec 11, 2015
1 parent e55e593 commit 7efd1fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-env mocha */
/* eslint react/no-multi-comp: 0 */

import React from 'react';
import expect from 'expect';
Expand Down
1 change: 1 addition & 0 deletions src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ function getRefinements(results, state) {
forEach(state.numericRefinements, (operators, attributeName) => {
forEach(operators, (values, operator) => {
forEach(values, (name) => {
name = name + '';
res.push({type: 'numeric', attributeName, name, operator});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ describe('currentRefinedValues()', () => {
{type: 'disjunctive', attributeName: 'disjunctiveFacet', name: 'disjunctiveFacet-val1', count: 3, exhaustive: true},
{type: 'disjunctive', attributeName: 'disjunctiveFacet', name: 'disjunctiveFacet-val2', count: 4, exhaustive: true},
{type: 'hierarchical', attributeName: 'hierarchicalFacet', name: 'hierarchicalFacet-val2', count: 6, exhaustive: true},
{type: 'numeric', attributeName: 'numericFacet', name: 1, operator: '>='},
{type: 'numeric', attributeName: 'numericFacet', name: 2, operator: '<='},
{type: 'numeric', attributeName: 'numericDisjunctiveFacet', name: 3, operator: '>='},
{type: 'numeric', attributeName: 'numericDisjunctiveFacet', name: 4, operator: '<='},
{type: 'numeric', attributeName: 'numericFacet', name: '1', operator: '>='},
{type: 'numeric', attributeName: 'numericFacet', name: '2', operator: '<='},
{type: 'numeric', attributeName: 'numericDisjunctiveFacet', name: '3', operator: '>='},
{type: 'numeric', attributeName: 'numericDisjunctiveFacet', name: '4', operator: '<='},
{type: 'tag', attributeName: '_tags', name: 'tag1'},
{type: 'tag', attributeName: '_tags', name: 'tag2'}
];
Expand Down

0 comments on commit 7efd1fd

Please sign in to comment.