@openmrs/esm-api 8.0.1-pre.3376 → 8.0.1-pre.3397

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.
@@ -1,3 +1,3 @@
1
- [0] Successfully compiled: 14 files with swc (88.83ms)
1
+ [0] Successfully compiled: 14 files with swc (86.14ms)
2
2
  [0] swc --strip-leading-paths src -d dist exited with code 0
3
3
  [1] tsc --project tsconfig.build.json exited with code 0
@@ -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 ?? data.locale;
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.3376",
3
+ "version": "8.0.1-pre.3397",
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.3376",
65
- "@openmrs/esm-error-handling": "8.0.1-pre.3376",
66
- "@openmrs/esm-globals": "8.0.1-pre.3376",
67
- "@openmrs/esm-navigation": "8.0.1-pre.3376",
64
+ "@openmrs/esm-config": "8.0.1-pre.3397",
65
+ "@openmrs/esm-error-handling": "8.0.1-pre.3397",
66
+ "@openmrs/esm-globals": "8.0.1-pre.3397",
67
+ "@openmrs/esm-navigation": "8.0.1-pre.3397",
68
68
  "@swc/cli": "^0.7.7",
69
69
  "@swc/core": "^1.11.29",
70
70
  "concurrently": "^9.1.2",
@@ -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 ?? data.locale;
117
+ let locale = data.locale ?? data.user?.userProperties?.defaultLocale;
118
118
 
119
119
  if (locale && locale.includes('_')) {
120
120
  locale = locale.replaceAll('_', '-');