socket-function 0.34.0 → 0.35.0

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 (2) hide show
  1. package/mobx/UrlParam.ts +5 -1
  2. package/package.json +1 -1
package/mobx/UrlParam.ts CHANGED
@@ -16,7 +16,11 @@ export class UrlParam<T> {
16
16
  if (value === null) {
17
17
  return this.defaultValue;
18
18
  }
19
- return JSON.parse(value) as T;
19
+ try {
20
+ return JSON.parse(value) as T;
21
+ } catch {
22
+ return undefined as any;
23
+ }
20
24
  }
21
25
  public set(value: T) {
22
26
  let url = new URL(location.href);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",