-
Notifications
You must be signed in to change notification settings - Fork 221
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
docs: Update the docParser to prevent max call stack errors [skip release] #2342
Conversation
@@ -173,7 +173,7 @@ export const SymbolDialog = ({value}: SymbolDialogProps) => { | |||
{breadcrumbsList.map((item, index) => { | |||
return ( | |||
<> | |||
{item === breadcrumbsList[breadcrumbsList.length - 1] ? ( | |||
{index === breadcrumbsList.length - 1 ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change fixes where a breadcrumb item is the same string as the previous.
For example:
Some Item > Nested ItemNested ItemNestedItem
This fix corrects the breadcrumb to render like
Some Item > Nested Item > Nested Item > Nested Item
1 flaky test on run #6194 ↗︎
Details:
cypress/integration/Autocomplete.spec.ts • 1 flaky testThis comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Sometimes the doc parser throws an `Maximum call stack exceeded" error. This happens when a type is self-referential, but not exported. Example:
If
NestedType
is referenced by an exported type, the doc parser will get into a recursive loop. This change adds symbol tracking per export to detect this case and will bail consideringNestedType
to be exported.Release Category
Documentation
Checklist
ready for review
has been added to PRFor the Reviewer
Where Should the Reviewer Start?
docParser.spec.ts
Areas for Feedback? (optional)