Skip to content

Commit

Permalink
[fixed] jquense#322
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Apr 3, 2016
1 parent ce83e15 commit b49b5ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/dataHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ export function valueMatcher(a, b, valueField){
dataValue(a, valueField), dataValue(b, valueField))
}

export function dataItem(data, item, valueField){
export function dataItem(data, item, valueField) {
var first = data[0]
, idx;

// make an attempt to see if we were passed in dataItem vs just a valueField value
// either an object with the right prop, or a primitive
// { valueField: 5 } || "hello" [ "hello" ]
if (has(item, valueField) || typeof first === typeof val)
if (has(item, valueField) || typeof first === typeof item)
return item

idx = dataIndexOf(data, dataValue(item, valueField), valueField)
Expand Down

0 comments on commit b49b5ef

Please sign in to comment.