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
The curryRight function normally works, but whenever I try and apply it in the map function it fails, complaining that the object is undefined. See the reproducible example below.
constfp=require("lodash");functiongetProperty(property,obj){constresult=obj[property]if(result===undefined)thrownewError('result object is undefined')returnresult};constexampleObject={id: '123'};constgetPropOfObjectCurryR=fp.curryRight(getProperty)(exampleObject);constgetPropOfObjectCurryL=fp.curry(getProperty)(fp.curry.placeholder,exampleObject);console.log(getPropOfObjectCurryL('id'));// this does not throw missing errorconsole.log(getPropOfObjectCurryR('id'));// this does not throw missing errorconsole.log(['id'].map(getPropOfObjectCurryL));// this does not throw missing errorconsole.log(['id'].map(getPropOfObjectCurryR));// this does throw the error
Note that is example was run using lodash version 4.17.21 and node version 16.19.0. Note that this is broken for both lodash and lodash/fp.
The text was updated successfully, but these errors were encountered:
The curryRight function normally works, but whenever I try and apply it in the map function it fails, complaining that the object is undefined. See the reproducible example below.
Note that is example was run using lodash version
4.17.21
and node version16.19.0
. Note that this is broken for bothlodash
andlodash/fp
.The text was updated successfully, but these errors were encountered: