erikras / erikras/react-lazy-cache
Falsy values passed into fn as undefined
Open
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```javascript
this.cache = lazyCache(this, {
cachedMyProp: {
params: ["myProp"],
fn(myProp) {
// prints undefined
console.log("myProp: ", myProp);
}
}
})
```
When myProp is 0, null, or "", the value of myProp passed into fn is undefined. It should be the original prop's value.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.