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] check for parent_component before accessing root #6646

Closed
wants to merge 1 commit into from

Conversation

hgiesel
Copy link
Contributor

@hgiesel hgiesel commented Aug 13, 2021

Fixes #6584.

Tests

No tests

@samedro
Copy link

samedro commented Oct 21, 2021

Hello any update on this ? It would fix many problems. Thanks

@atomcat1978
Copy link

Does defining document as fallback really work as expected? To me it seems a bit suspicious.

@Tlahey
Copy link

Tlahey commented Jul 27, 2022

Hello, I have the same issue on my side with the latest version.

In fact, if we check the parent_component value it's works.
But if we set the value as a document we need to refactor the append_styles function behind which is return undefined (and crash) if the root are document

@atomcat1978
Copy link

Actually, in my case the reason of the problem was that svelte was included in a component library project. This led to various bugs, being one of them this undefined parent_component. I wonder, that possibly different/multiple svelte versions in the application and the used svelte component (npm package) might be the real reason of such issues.

@dummdidumm
Copy link
Member

Thanks for the PR, but this isn't a real fix for the underlying problem, which is that people are using different compiled versions of Svelte mixed up in the same project. This fix might solve the undefined issue, but other subtle bugs due to different compiler versions may occur. More info here: #6584 (comment)

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.

New component root property may throw errors
5 participants