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

fix: generated app id not deduped #1719

Merged
merged 1 commit into from
Feb 11, 2022
Merged

fix: generated app id not deduped #1719

merged 1 commit into from
Feb 11, 2022

Conversation

soultice
Copy link
Contributor

@soultice soultice commented Feb 11, 2022

This fixes a bug where more than two components with the same name could not be held apart by the backend. It is looking for defaultId:countwhile counting references but then names the reference defaultId_count this resulted in a maximum of two components with the same name being recognized (that is clickable) in the devtools.

Copy link
Member

@Akryum Akryum left a comment

Choose a reason for hiding this comment

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

Good catch

@@ -142,7 +142,7 @@ export function getAppRecordId (app, defaultId?: string): string {
while (appIds.has(`${defaultId}:${count}`)) {
Copy link
Member

Choose a reason for hiding this comment

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

It should be changed here instead

@Akryum Akryum changed the title fix: give correct identifier to app fix: generated app id not deduped Feb 11, 2022
This fixes a bug where more than two components with the same name could
not be held apart by the backend. It is looking for `defaultId:count`
while counting references but then names the reference `defaultId_count`
this resulted in a maximum of two components with the same name being
recognized (that is clickable) in the devtools.
@soultice
Copy link
Contributor Author

Hope I got you right and you want _ for the separator?

@soultice soultice requested a review from Akryum February 11, 2022 18:49
@Akryum
Copy link
Member

Akryum commented Feb 11, 2022

Yes because now : should only used to separate the app id and the component id
022b2da

@Akryum Akryum merged commit f82722b into vuejs:main Feb 11, 2022
@soultice
Copy link
Contributor Author

Thanks for the merge, greatly appreciated 👍

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.

None yet

2 participants