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(frontend): Don't crash on color retrieval error #24780

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

Twixes
Copy link
Member

@Twixes Twixes commented Sep 4, 2024

Problem

Sometimes JS tries to get color variables before CSS is ready, causing problems. Currently, this means graphs crashing. See Sentry.

Changes

The problem with colors not being ready is real, but there's no need to crash. We'll still be capturing these problems, but instead of crashing, it's totally fine to return black/white (depending on theme). It's almost guaranteed that subsequent getColorVar() will work.

@Twixes Twixes requested a review from a team September 4, 2024 13:14
Copy link
Contributor

github-actions bot commented Sep 4, 2024

Size Change: 0 B

Total Size: 1.11 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.11 MB

compressed-size-action

@Twixes Twixes merged commit e26da47 into master Sep 4, 2024
91 checks passed
@Twixes Twixes deleted the stop-color-retrieval-from-raising branch September 4, 2024 13:32
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