You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling update on a key-path that resolves to a function causes the updater to be passed the function.
Observed Behavior
Calling update on a key-path that resolves to a function causes the updater to be passed undefined.
Steps to Reproduce
import{update}from'lodash/fp';constobj={a: 1,b: n=>n*2};console.log(obj.b(2));// 4constupdatedObj=update('b',fn=>n=>fn(n)+1,obj);console.log(updatedObj.b(2));// TypeError: fn is not a function
Notes
For comparison, this works in the normal version of lodash:
Expected Behavior
Calling
update
on a key-path that resolves to a function causes the updater to be passed the function.Observed Behavior
Calling
update
on a key-path that resolves to a function causes the updater to be passedundefined
.Steps to Reproduce
Notes
For comparison, this works in the normal version of
lodash
:The text was updated successfully, but these errors were encountered: