-
-
Notifications
You must be signed in to change notification settings - Fork 632
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(store): robust flush batch #2871
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
commit: |
Preview in LiveCodesLatest commit: 035007c
See documentations for usage instructions. |
Nice catch. I forgot about that calling a listener can throw. |
ffc0008
to
46637d0
Compare
46637d0
to
edb0d06
Compare
edb0d06
to
fea7fa0
Compare
fea7fa0
to
d9178e7
Compare
d9178e7
to
ecb4fa9
Compare
Co-authored-by: Daishi Kato <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
Summary
The recent refactor #2868 to batching causes a subtle regression in which errors thrown in listeners could cause the remaining listeners for that atom not to run.
This PR flattens listeners to the pending function so errors thown are detected but only rethrown after the remaining listeners have been processed.
Check List
pnpm run prettier
for formatting code and docs