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: Allow renderer short-circuit if unable to render anything #200

Merged
merged 1 commit into from
Jan 22, 2023

Conversation

meyfa
Copy link
Owner

@meyfa meyfa commented Jan 22, 2023

The text renderer would previously throw in some circumstances if no font was available. With this patch, its prepareRenderParams() method can return null in these cases, aborting the render for that text element without causing a crash.

This also simplifies RectRenderer, which doesn't need an "empty" state anymore.

The text renderer would previously throw in some circumstances if no
font was available. With this patch, its `prepareRenderParams()` method
can return `null` in these cases, aborting the render for that text
element without causing a crash.

This also simplifies RectRenderer, which doesn't need an "empty" state
anymore.
@meyfa meyfa added this to the v0.14.1 milestone Jan 22, 2023
@meyfa meyfa merged commit 35d6c36 into main Jan 22, 2023
@meyfa meyfa deleted the fix/render-params-null branch January 22, 2023 14:25
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