diff --git a/lodash.js b/lodash.js index 138bf6869..cabe146a8 100644 --- a/lodash.js +++ b/lodash.js @@ -3710,23 +3710,14 @@ function contains(collection, target, fromIndex) { var length = collection ? collection.length : 0; if (!(typeof length == 'number' && length > -1 && length <= maxSafeInteger)) { - var props = keys(collection); - length = props.length; + collection = values(collection); + length = collection.length; } if (typeof fromIndex == 'number') { fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); } else { fromIndex = 0; } - if (props) { - while (fromIndex < length) { - var value = collection[props[fromIndex++]]; - if (value === target) { - return true; - } - } - return false; - } if (typeof collection == 'string' || !isArray(collection) && isString(collection)) { if (fromIndex >= length) { return false;