Skip to content

Webpack dev server: Fixed locale handling (null check)#685

Merged
lslezak merged 2 commits intomasterfrom
webpack_locale_fix
Aug 3, 2023
Merged

Webpack dev server: Fixed locale handling (null check)#685
lslezak merged 2 commits intomasterfrom
webpack_locale_fix

Conversation

@lslezak
Copy link
Copy Markdown
Contributor

@lslezak lslezak commented Aug 3, 2023

Properly handle locales with just a language code without country (e.g. "cs").

In that case country is null and calling toUpperCase() fails... 😮

Properly handle locale with just a language code without country
(e.g. "cs")
Copy link
Copy Markdown
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, but you might want to try the optional chaining operator.

@coveralls
Copy link
Copy Markdown

coveralls commented Aug 3, 2023

Coverage Status

coverage: 72.079%. remained the same when pulling 2be011d on webpack_locale_fix into fa00c19 on master.

Copy link
Copy Markdown
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still LGTM. Thanks!

@lslezak lslezak merged commit 57d328b into master Aug 3, 2023
@lslezak lslezak deleted the webpack_locale_fix branch August 3, 2023 09:46
@imobachgs imobachgs mentioned this pull request Sep 26, 2023
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.

3 participants