Skip to content

fix(utils): default normalize() to a max. of 100 levels deep instead of Inifnity - #7957

Merged
mydea merged 1 commit into
developfrom
fn/normalize-proxy
Apr 26, 2023
Merged

fix(utils): default normalize() to a max. of 100 levels deep instead of Inifnity#7957
mydea merged 1 commit into
developfrom
fn/normalize-proxy

Conversation

@mydea

Copy link
Copy Markdown
Member

This is to avoid infinite recursion that we cannot detect, e.g. when using dynamic proxies.

Fixes#7947 (hopefully).

This is to avoid infinite recursion that we cannot detect, e.g. when using dynamic proxies.
@mydea
mydea requested review from AbhiPrasad and lforstApril 25, 2023 14:52
@mydeamydea self-assigned this Apr 25, 2023
@mydea
mydea marked this pull request as ready for review April 26, 2023 07:23
@mydeamydea changed the title fix(utils): normalize() to a max. of 100 levels deep by defaultfix(utils): default normalize() to a max. of 100 levels deep instead of InifnityApr 26, 2023
Comment on lines +129 to +137
for (let i = 0; i < 99; i++) {
expect(last).toEqual(
expect.objectContaining({
name: expect.any(String),
child: expect.any(Object),
}),
);
last = last.child;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drastic times call for drastic measures

@lforst

Copy link
Copy Markdown
Contributor

We should def put this in the changelog - maybe you can put a note there within this pr under a ## Unreleased heading

@mydea

Copy link
Copy Markdown
MemberAuthor

We should def put this in the changelog - maybe you can put a note there within this pr under a ## Unreleased heading

I added a changelog entry!

Sign up for freeto 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.

Replay: SDK is stuck in an infinite loop.

2 participants

@mydea@lforst