Does unflatten enter into infinite recursion on function or array members?
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
I'm using this library in an F# project (transpiles to JS through using Fable). So unfortunately I have no JS repro (I'm not a JS dev).
`unflatten` is mostly working fine, but it seems to enter into infinite recursion on some objects. This happens even when there is seemingly nothing to unflatten.
I have an array of key-value pairs (React props) that I'm converting into an object, and then I'm using `unflatten` on this object.
This works fine for some prop arrays, such as this:

However, for others, such as this, it enters into an infinite recursion:


As you can see, in both cases, the original prop list (and thus the object) does not contain keys with the delimiter, and there are no sub-objects to recurse into (unless it does something with the function), so AFAIK `unflatten` shouldn't modify anything.
I have tried `safe` without any effect.
The weird thing is, the stack trace seems to come from the `flatten` function, which I do not call:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.