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: add an extra condition for tryOnMounted method #6454

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrew-cmdltt
Copy link

@andrew-cmdltt andrew-cmdltt commented Sep 22, 2024

For issue #6453 
This pull request includes an extra condition for tryOnMounted. It was made because getCurrentInstance returns an object that could have a isMounted: true flag value, but the value of the Vue application context properties, for example, 'components', could have null. So this fix is useful for module federation and can fix CSS variables problems that I described in the issue ahead.
This change improves the problem with CSS rules applying. There are some pictures before and after changes. It's from my MF Primevue example https://github.com/andrew-cmdltt/primevue-4-vite-issue-template-mf.
Before:
image
After:
image
So now these CSS rules are not undefined and attached to the head:
image

Copy link

vercel bot commented Sep 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Sep 22, 2024 6:14pm
primevue-v3 ⬜️ Ignored (Inspect) Visit Preview Sep 22, 2024 6:14pm

@andrew-cmdltt andrew-cmdltt marked this pull request as draft September 23, 2024 12:10
@andrew-cmdltt andrew-cmdltt marked this pull request as ready for review September 23, 2024 12:10
@tugcekucukoglu tugcekucukoglu added the Resolution: Help Wanted Issue or pull request requires extra help and feedback label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants