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: resolve the promise when component is closed/destroyed #455

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

siddy2181
Copy link
Contributor

Problem: Due to asynchronous render, whenever a component is canceled before it has finished rendering, zoid throws the Component closed error.
Fixes: #334
Screenshot 2024-05-15 at 5 27 54 PM

Solution:
We want to reject the promise only if an error occurs that's not one of the component unmounted errors.

@siddy2181 siddy2181 marked this pull request as ready for review May 20, 2024 17:54
@siddy2181 siddy2181 requested a review from a team as a code owner May 20, 2024 17:54
Copy link

@sebastianfdz sebastianfdz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious to know which Flow error came from this change?

@yongzhihuang
Copy link

hello, can we please merge this?

@wsbrunson
Copy link
Member

CI is failing: https://github.com/krakenjs/zoid/actions/runs/9105053310/job/25190938320?pr=455

@siddy2181
Copy link
Contributor Author

Like @wsbrunson mentioned,
We won't be able to merge this PR until we have the CI fix merged
PR: #457

Copy link

@mchoun mchoun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mchoun mchoun merged commit b42cc03 into krakenjs:main Jun 4, 2024
1 check passed
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.

6 participants