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: don't throw if locale is undefined #5

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

sebamarynissen
Copy link
Member

If you did not specify a locale to createI18n(), an error will be thrown where it is not really clear what is happening because we try to read length from undefined. Fixed it now by defaulting it to a string. If you've configured warnings, it will show a warning that it could not find the message for the empty locale.

@sebamarynissen sebamarynissen self-assigned this Jul 16, 2024
@sebamarynissen sebamarynissen merged commit 229809c into main Jul 16, 2024
1 check passed
@sebamarynissen sebamarynissen deleted the fix/undefined-locale branch July 16, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant