@statsig/client-core 3.30.1 → 3.30.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/client-core",
3
- "version": "3.30.1",
3
+ "version": "3.30.2",
4
4
  "license": "ISC",
5
5
  "homepage": "https://github.com/statsig-io/js-client-monorepo",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "3.30.1";
1
+ export declare const SDK_VERSION = "3.30.2";
2
2
  export type StatsigMetadata = {
3
3
  readonly [key: string]: string | undefined | null;
4
4
  readonly appVersion?: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatsigMetadataProvider = exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = '3.30.1';
4
+ exports.SDK_VERSION = '3.30.2';
5
5
  let metadata = {
6
6
  sdkVersion: exports.SDK_VERSION,
7
7
  sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients
@@ -75,7 +75,13 @@ exports.Storage = {
75
75
  };
76
76
  function _getObjectFromStorage(key) {
77
77
  const value = exports.Storage.getItem(key);
78
- return JSON.parse(value !== null && value !== void 0 ? value : 'null');
78
+ try {
79
+ return JSON.parse(value !== null && value !== void 0 ? value : 'null');
80
+ }
81
+ catch (e) {
82
+ Log_1.Log.error(`Failed to parse value for key "${key}"`);
83
+ return null;
84
+ }
79
85
  }
80
86
  exports._getObjectFromStorage = _getObjectFromStorage;
81
87
  function _setObjectInStorage(key, obj) {