Skip to content

fix: signal is aborted without reason#4331

Merged
JonnyBurger merged 2 commits intoremotion-dev:mainfrom
andrzej-woof:fix/abort-without-reason
Sep 27, 2024
Merged

fix: signal is aborted without reason#4331
JonnyBurger merged 2 commits intoremotion-dev:mainfrom
andrzej-woof:fix/abort-without-reason

Conversation

@andrzej-woof
Copy link
Contributor

Fixes issue when free() is called inside different useEffect

CleanShot 2024-09-27 at 10 59 43

@vercel
Copy link
Contributor

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