You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix getSystemEnvironment crash on web when a locale region is undefined (#5447)
Handle a case when Int.Locale('...') is created without a region - then
use an empty string for region.
Fixes https://youtrack.jetbrains.com/issue/CMP-6930
## Testing
- Added a test
- This should be tested by QA
## Release Notes
### Fixes - Resources
- Fix a crash when calling `getString` and the Locale has no region
specified
Copy file name to clipboardExpand all lines: components/resources/library/src/wasmJsMain/kotlin/org/jetbrains/compose/resources/ResourceEnvironment.wasmJs.kt
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,11 @@ import kotlinx.browser.window
5
5
privateexternalclassIntl {
6
6
classLocale(locale:String) {
7
7
val language:String
8
-
val region:String
8
+
9
+
// Intl.Locale.region can be undefined.
10
+
// For example, new Int.Locale('en') instead of new Int.Locale('en-NL').
0 commit comments