Skip to content

fix: prevent calling remove fn with null value in snippet_effect #9675

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

Closed
wants to merge 1 commit into from

Conversation

otodockal
Copy link

@otodockal otodockal commented Nov 27, 2023

Closes #9678

There might be a bug related to snippet_effect or create_snippet_block fns...At some point block.d becomes [null] for some reason. Very likely not the right fix, just a hint.

  • svelte 5.0.0-next.15
  • @sveltejs/kit 1.27.6
Screenshot 2023-11-27 at 21 32 36 Screenshot 2023-11-27 at 19 37 28

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests and linting

  • Run the tests with pnpm test and lint the project with pnpm lint

Copy link

changeset-bot bot commented Nov 27, 2023

⚠️ No Changeset found

Latest commit: 40a5867

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Nov 27, 2023

@otodockal is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Nov 29, 2023

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

Name Status Preview Comments Updated (UTC)
svelte-5-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 29, 2023 0:05am

@trueadm
Copy link
Contributor

trueadm commented Nov 29, 2023

Do you have a repro or example where this happens? That field should never become [null] so the fix is likely to be somewhere else. i.e. this line:

https://github.com/sveltejs/svelte/blob/main/packages/svelte/src/internal/client/render.js#L209

Is this creating [null] for you in your case?

@otodockal
Copy link
Author

@trueadm you can reproduce the bug in this repo I've just created:
https://github.com/otodockal/svelte-5-runes-bug

Once you run it, try to navigate and the error is shown in the console.

When you remove this line (<Icon>→</Icon>), it will start working again.
https://github.com/otodockal/svelte-5-runes-bug/blob/main/src/routes/%2Bpage.svelte#L8

Is this creating [null] for you in your case?

I'll check it.

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.

Svelte 5: Cannot read properties of null (reading 'isConnected')
2 participants