Ensure _.iteratee clones sources for "_.matchesProperty" shorthand.

This commit is contained in:
John-David Dalton
2016-01-31 13:15:44 -08:00
parent 6c85e7015a
commit 3bdaf99cfa
2 changed files with 32 additions and 5 deletions

View File

@@ -13150,9 +13150,7 @@
* // => [{ 'user': 'fred', 'age': 40 }]
*/
function iteratee(func) {
return (isObjectLike(func) && !isArray(func))
? matches(func)
: baseIteratee(func);
return baseIteratee(typeof func == 'function' ? func : baseClone(func, true));
}
/**