@openmrs/esm-api 8.0.1-pre.3371 → 8.0.1-pre.3385
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/dist/current-user.js +1 -1
- package/package.json +5 -5
- package/src/current-user.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
package/dist/current-user.js
CHANGED
|
@@ -50,7 +50,7 @@ function isValidLocale(locale) {
|
|
|
50
50
|
return true;
|
|
51
51
|
}
|
|
52
52
|
export function setUserLanguage(data) {
|
|
53
|
-
let locale = data.user?.userProperties?.defaultLocale
|
|
53
|
+
let locale = data.locale ?? data.user?.userProperties?.defaultLocale;
|
|
54
54
|
if (locale && locale.includes('_')) {
|
|
55
55
|
locale = locale.replaceAll('_', '-');
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-api",
|
|
3
|
-
"version": "8.0.1-pre.
|
|
3
|
+
"version": "8.0.1-pre.3385",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "The javascript module for interacting with the OpenMRS API",
|
|
6
6
|
"type": "module",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"@openmrs/esm-navigation": "6.x"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@openmrs/esm-config": "8.0.1-pre.
|
|
65
|
-
"@openmrs/esm-error-handling": "8.0.1-pre.
|
|
66
|
-
"@openmrs/esm-globals": "8.0.1-pre.
|
|
67
|
-
"@openmrs/esm-navigation": "8.0.1-pre.
|
|
64
|
+
"@openmrs/esm-config": "8.0.1-pre.3385",
|
|
65
|
+
"@openmrs/esm-error-handling": "8.0.1-pre.3385",
|
|
66
|
+
"@openmrs/esm-globals": "8.0.1-pre.3385",
|
|
67
|
+
"@openmrs/esm-navigation": "8.0.1-pre.3385",
|
|
68
68
|
"@swc/cli": "^0.7.7",
|
|
69
69
|
"@swc/core": "^1.11.29",
|
|
70
70
|
"concurrently": "^9.1.2",
|
package/src/current-user.ts
CHANGED
|
@@ -114,7 +114,7 @@ function isValidLocale(locale: unknown): locale is string {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
export function setUserLanguage(data: Session) {
|
|
117
|
-
let locale = data.user?.userProperties?.defaultLocale
|
|
117
|
+
let locale = data.locale ?? data.user?.userProperties?.defaultLocale;
|
|
118
118
|
|
|
119
119
|
if (locale && locale.includes('_')) {
|
|
120
120
|
locale = locale.replaceAll('_', '-');
|