This repository was archived by the owner on Jul 23, 2021. It is now read-only.
"too much recursion" error when creating a Record type from an instance of another Record #127
Labels
Milestone
From @joepie91 on Tue, 12 Feb 2019 12:51:29 GMT
What happened
When creating a new Record type, and passing in an instance of another Record as the schema / default values, Immutable will end up in an infinite recursion loop, yielding the following error:
I don't know whether it conceptually makes sense to try to do this (see the repro below); in my case the 'nested Record' structure was caused by a mistake during refactoring.
However, the current error is completely unclear about the cause of the issue, and provides no real way to track down the cause. I ended up spending several hours trying to find the root cause.
Expected behaviour: Either produce an understandable error with concrete guidance (if this is not supposed to be supported), or work correctly without breaking (if it is supposed to be supported).
How to reproduce
Repro:
Tested in Firefox 64.0 with latest Immutable.js (4.0.0-rc.12).
Copied from original issue: immutable-js#1690
The text was updated successfully, but these errors were encountered: