mirror of https://github.com/sveltejs/svelte
fix: reinstate reactivity loss tracking (#17801)
We commented out this code in #17038 because it was broken. I suspect it was broken because we weren't correctly calling `unset_context` inside `run`, leading to false positives — this is now fixed, and as such I _think_ we can safely reinstate it. One small change — I got rid of the `was_read` check. I assume this existed to prevent duplicate warnings, but it actually causes false negatives in the case where you read a signal while the reaction is being tracked then again while it's untracked. ### Before submitting the PR, please make sure you do the following - [x] 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 - [x] Prefix your PR title with `feat:`, `fix:`, `chore:`, or `docs:`. - [x] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. - [x] If this PR changes code within `packages/svelte/src`, add a changeset (`npx changeset`). ### Tests and linting - [x] Run the tests with `pnpm test` and lint the project with `pnpm lint` --------- Co-authored-by: Tee Ming <chewteeming01@gmail.com>pull/17953/head
parent
6a303c3638
commit
5faf102782
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: reinstate reactivity loss tracking
|
||||
Loading…
Reference in new issue