Skip to content

memoize only when the computed value is not null fixes #53#54

Closed
cosmosgenius wants to merge 1 commit intofrida:masterfrom
appknox:memoize-only-not-null
Closed

memoize only when the computed value is not null fixes #53#54
cosmosgenius wants to merge 1 commit intofrida:masterfrom
appknox:memoize-only-not-null

Conversation

@cosmosgenius
Copy link
Contributor

@cosmosgenius cosmosgenius commented Jan 11, 2018

The getApi function was getting memoize for the return value null as mentioned in the issue #53. This PR checks if the returned value of the compute function is null or not and if it is then doesn't memoize.

@subho007
Copy link

@oleavr this fixes it

@oleavr
Copy link
Member

oleavr commented Jan 18, 2018

Thanks! Wasn't able to review this until now as I was refactoring surrounding code. I realized this was slightly more complicated, so I implemented a different solution it in 4de996c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants