mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Fix object coercion.
This commit is contained in:
@@ -24,9 +24,8 @@
|
||||
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
||||
*/
|
||||
function forOwn(object, iteratee) {
|
||||
if (object != null) {
|
||||
Object.keys(Object(object)).forEach((key) => iteratee(object[key], key, object))
|
||||
}
|
||||
object = Object(object)
|
||||
Object.keys(object).forEach((key) => iteratee(object[key], key, object))
|
||||
}
|
||||
|
||||
export default forOwn
|
||||
|
||||
Reference in New Issue
Block a user