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: signal is aborted without reason #4331

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

andrzej-woof
Copy link
Contributor

Fixes issue when free() is called inside different useEffect

CleanShot 2024-09-27 at 10 59 43

Copy link

vercel bot commented Sep 27, 2024

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

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2024 10:21am
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2024 10:21am
remotion-convert ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2024 10:21am

@JonnyBurger
Copy link
Member

Nice, thanks! TIL

Should the reason be an Error object instead of a string maybe?

https://dom.spec.whatwg.org/#ref-for-dom-abortsignal-reason%E2%91%A0 seems to think so because if there is no reason, it uses an Exception which is an Error

If a string is thrown, then one could have a problem in their .catch handler if they do err.message.includes

@andrzej-woof
Copy link
Contributor Author

@JonnyBurger you're obviously correct, I just made a quick patch for myself without giving it much thought.
To be fair a nicer solution would be to have default reason and maybe expose passing custom reason as an argument free(reason)

@JonnyBurger
Copy link
Member

Nice, thanks!

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.

2 participants