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

chore: fix type error in local slice #278

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

EvanHahn
Copy link
Contributor

This is a types-only change and should have no impact on functionality.

usePersistedLocale had a type error because getLocales()[0] might be undefined. However, the docs for getLocales() say that we are "guaranteed" to have at least one element, so we can use a non-null assertion.

This is a types-only change and should have no impact on functionality.

`usePersistedLocale` had a type error because `getLocales()[0]` might be
undefined. However, the docs for `getLocales()` say that we are
"guaranteed" to have at least one element, so we can use a non-null
assertion.
@EvanHahn EvanHahn merged commit 1b8701a into main Apr 25, 2024
3 checks passed
@EvanHahn EvanHahn deleted the fix-type-error-when-slicing-locale branch April 25, 2024 19:23
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