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

@remotion/google-fonts: Eliminate loading race condition #4082

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

JonnyBurger
Copy link
Member

If loadFont() is called multiple times, the second invocation resolves waitUntilReady() too early.

This is a problem in React Strict Mode, because one might set a fontLoaded flag to true on any of the two calls.

Copy link

vercel bot commented Jul 15, 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 Jul 15, 2024 3:51pm
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 3:51pm

@JonnyBurger JonnyBurger enabled auto-merge July 15, 2024 15:50
@JonnyBurger JonnyBurger merged commit 29b23ed into main Jul 15, 2024
13 checks passed
@JonnyBurger JonnyBurger deleted the google-fonts-loading branch July 15, 2024 15:56
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.

1 participant