mirror of https://github.com/sveltejs/svelte
chore: robustify `flatten` (#17864)
Extracted from #17805. Currently we restore context in`flatten` unnecessarily in the case where we have async expressions but no blockers (the context is already correct), and we don't unset context after blockers resolve in the case where we have them. The first bit is suboptimal, but the second bit feels bug-shaped, even though I'm not currently aware of any actual bugs that have resulted from this. ### 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. - [ ] 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`pull/17869/head
parent
9066b75c01
commit
aed36051fd
Loading…
Reference in new issue