Closed nonara closed 3 years ago
What would the fix be here, other than "fix your isMergeableObject
implementation"?
Ok. I had a look at the code. isMergeableObject
is typed isMergeableObject?(value: object): boolean
, so I assumed that it was only passing elements which had the object
js type. It's actually passing primitives as well.
Adding a typeof value === 'object'
check to my isMergeableObject
fixes the crash.
Might be worth it to change the call signature to (value:any): boolean
hmm, so that's an issue with the TS typings then
Hello. Thanks for your work on deepmerge!
When using
all
withisMergeableObject
and a nested object, it blows the stack in an infinite recursion scenario.Reproduction: