@shipengine/elements 0.26.1 → 0.26.2

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.
Files changed (3) hide show
  1. package/index.cjs +6 -2
  2. package/index.js +6 -2
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -3715,8 +3715,12 @@ $$c({ target: 'String', proto: true }, {
3715
3715
  }
3716
3716
  });
3717
3717
 
3718
- var _a;
3719
- let _LOCALE = (_a = navigator === null || navigator === void 0 ? void 0 : navigator.language) !== null && _a !== void 0 ? _a : "en-US";
3718
+ // TODO: Quick Fix for White Label; The navigator object cannot be accessed from within SSR,
3719
+ // so this provides default value until this feature can be refactored to support SSR.
3720
+ let _LOCALE = "en-US";
3721
+ try {
3722
+ _LOCALE = navigator.language;
3723
+ } catch (_a) {}
3720
3724
  const loadableLocale = _LOCALE.replaceAll("-", "");
3721
3725
  const loadableBackupLocale = _LOCALE.split("-")[0];
3722
3726
  let intlLocale = undefined;
package/index.js CHANGED
@@ -3683,8 +3683,12 @@ $$c({ target: 'String', proto: true }, {
3683
3683
  }
3684
3684
  });
3685
3685
 
3686
- var _a;
3687
- let _LOCALE = (_a = navigator === null || navigator === void 0 ? void 0 : navigator.language) !== null && _a !== void 0 ? _a : "en-US";
3686
+ // TODO: Quick Fix for White Label; The navigator object cannot be accessed from within SSR,
3687
+ // so this provides default value until this feature can be refactored to support SSR.
3688
+ let _LOCALE = "en-US";
3689
+ try {
3690
+ _LOCALE = navigator.language;
3691
+ } catch (_a) {}
3688
3692
  const loadableLocale = _LOCALE.replaceAll("-", "");
3689
3693
  const loadableBackupLocale = _LOCALE.split("-")[0];
3690
3694
  let intlLocale = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/elements",
3
- "version": "0.26.1",
3
+ "version": "0.26.2",
4
4
  "typedoc": {
5
5
  "entryPoint": "./src/index.ts",
6
6
  "readmeFile": "../../README.md",