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: register viewer by uniq name instead of "component" #5312

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Jan 24, 2024

📝 Summary

  • Anonymous function in object property has a name of the property - component
  • This name is used for global viewer component registration
  • component is not a valid name, because it is a built-in name for Vue and it registers a global component
  • Using named function to have an explicit name

Probably should be handled by Viewer, but I haven't found any other app with async component registration. I guess it is not possible to use 2 viewers with dynamic anonymous components.

image

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

- Anonymous function in object property has a name of the property - component
- This name is used for global viewer component registration
- `component` is not a valid name, because it is a built-in name for Vue and it registers a global component
- Using named function to have an explicit name

Signed-off-by: Grigorii K. Shartsev <[email protected]>
@juliushaertl juliushaertl merged commit eea6469 into main Jan 25, 2024
53 checks passed
@juliushaertl juliushaertl deleted the fix/viewer-comopnent-registration branch January 25, 2024 07:50
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 25, 2024

@skjnldsv Do you think this should be handled by Viewer?
Currently Text is the only app that uses dynamic registration (according to the search in GitHub)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants