Skip to content

Conversation

@DemonHa
Copy link

@DemonHa DemonHa commented Aug 28, 2025

The current Clone, Check and Cast functions does not handle recursive (circular) structures. When an object references itself, the function runs into infinite recursion and throws a Maximum call stack size exceeded error.

const a = { x: 1 };
a.b = a;

Clone(a); // ❌ Fails with Maximum call stack error

This PR adds support for recursive structures by detecting and handling circular references. Objects that reference themselves (directly or indirectly) can now be processed safely without causing stack overflows.

@DemonHa DemonHa merged commit aace0d7 into master Aug 28, 2025
18 checks passed
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.

2 participants