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
Version 1.1.1 removes the default serializer arg (serializer = value => JSON.stringify(value)).
This breaks the case where the single argument to the memoized function is itself a function:
> const memoize = require('nano-memoize')
undefined
> const memoized = memoize(fn => o => fn(o))
undefined
> const myFunc = memoized(o => console.log(o))
TypeError: p is not a function
at Object.<anonymous> (/Users/aaronmccall/Projects/phytochrome-web-ui/node_modules/nano-memoize/index.js:35:118)
>
The text was updated successfully, but these errors were encountered:
On Tue, Apr 9, 2019, 2:15 PM Aaron McCall ***@***.*** wrote:
Version 1.1.1 removes the default serializer arg (serializer = value =>
JSON.stringify(value)).
This breaks the case where the single argument to the memoized function is
itself a function:
> const memoize = require('nano-memoize')
undefined
> const memoized = memoize(fn => o => fn(o))
undefined
> const myFunc = memoized(o => console.log(o))
TypeError: p is not a function
at Object.<anonymous> (/Users/aaronmccall/Projects/phytochrome-web-ui/node_modules/nano-memoize/index.js:35:118)
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEuqSyqkq2QQh-gcHLStozpSndisae7Dks5vfNipgaJpZM4clHbL>
.
@aaronmccall Fixed, although not by re-introducing default arg. instead, do a type check for "function" in the code and branch. unit test added. thanks for finding the bug!
Version 1.1.1 removes the default serializer arg (
serializer = value => JSON.stringify(value)
).This breaks the case where the single argument to the memoized function is itself a function:
The text was updated successfully, but these errors were encountered: