Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.9] FitBoxes recursion when dimensions are NaN #7853

Merged

Conversation

alessandroasm
Copy link

Adding a verification on updateDims that handles a case when dimensions are both NaN. This caused an infinite recursion on fitBoxes when calculating the layout for a chart that is mounted on an element that is not yet in DOM.

I also added a test case for this issue.

Fixes #7761

@kurkle
Copy link
Member

kurkle commented Oct 6, 2020

Looks like gulp docs is failing for some reason.

@etimberg
Copy link
Member

etimberg commented Oct 6, 2020

Looks like gulp docs is failing for some reason.

npm run docs doesn't do npm ci inside of the docs folder, instead it does npm install. Likely a dependency updated.

@alessandroasm alessandroasm changed the title Fixboxes recursion when dimensions are NaN FitBoxes recursion when dimensions are NaN Oct 6, 2020
@kurkle
Copy link
Member

kurkle commented Oct 6, 2020

npm run docs doesn't do npm ci inside of the docs folder, instead it does npm install. Likely a dependency updated.

This is against 2.9, so it uses gitbook. It looks like the issue is in that.

@kurkle
Copy link
Member

kurkle commented Oct 6, 2020

@kurkle kurkle changed the title FitBoxes recursion when dimensions are NaN [2.9] FitBoxes recursion when dimensions are NaN Oct 8, 2020
Adding a verification on updateDims that handles a case when dimensions are both
NaN. This caused an infinite recursion on fitBoxes when calculating the layout
for a chart that is mounted on an element that is not yet in DOM.

Fixes chartjs#7761
@alessandroasm alessandroasm force-pushed the fixboxes-recursion-when-dimensions-are-nan branch from c7052a7 to ef43b7f Compare October 8, 2020 13:22
@etimberg etimberg merged commit 063b7dc into chartjs:2.9 Oct 9, 2020
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.

"Uncaught RangeError: Maximum call stack size exceeded" when parent element not in DOM tree yet
3 participants