@trycourier/react-provider 1.53.1-internal.8049365.0 → 1.53.1

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/dist/index.js CHANGED
@@ -96,7 +96,7 @@ var CourierProvider = function CourierProvider(_ref) {
96
96
  children = _ref.children,
97
97
  clientKey = _ref.clientKey,
98
98
  _ref$localStorage = _ref.localStorage,
99
- localStorage = _ref$localStorage === void 0 ? (_window = window) === null || _window === void 0 ? void 0 : _window.localStorage : _ref$localStorage,
99
+ localStorage = _ref$localStorage === void 0 ? typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : _window.localStorage : undefined : _ref$localStorage,
100
100
  _ref$middleware = _ref.middleware,
101
101
  _middleware = _ref$middleware === void 0 ? [] : _ref$middleware,
102
102
  onMessage = _ref.onMessage,
@@ -108,14 +108,14 @@ var CourierProvider = function CourierProvider(_ref) {
108
108
  var clientSourceId = (0, _react.useMemo)(function () {
109
109
  var clientKeyId = id ? "".concat(clientKey, "/").concat(id) : clientKey;
110
110
  var clientSourceIdLSKey = "".concat(clientKeyId, "/").concat(userId, "/clientSourceId");
111
- var localStorageClientSourceId = localStorage.getItem(clientSourceIdLSKey);
111
+ var localStorageClientSourceId = localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(clientSourceIdLSKey);
112
112
 
113
113
  if (localStorageClientSourceId) {
114
114
  return localStorageClientSourceId;
115
115
  }
116
116
 
117
117
  var newClientSourceId = uuid.v4();
118
- localStorage.setItem(clientSourceIdLSKey, newClientSourceId);
118
+ localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem(clientSourceIdLSKey, newClientSourceId);
119
119
  return newClientSourceId;
120
120
  }, [localStorage, clientKey, userId]);
121
121
  var middleware = [].concat((0, _toConsumableArray2["default"])(_middleware), (0, _toConsumableArray2["default"])(_middleware2["default"]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/react-provider",
3
- "version": "1.53.1-internal.8049365.0+8049365",
3
+ "version": "1.53.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "typings/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@trycourier/client-graphql": "^1.53.1-internal.8049365.0+8049365",
18
+ "@trycourier/client-graphql": "^1.53.1",
19
19
  "buffer": "^6.0.3",
20
20
  "graphql": "^15.5.0",
21
21
  "react-use": "^17.2.1",
@@ -32,5 +32,5 @@
32
32
  "dist/",
33
33
  "typings/"
34
34
  ],
35
- "gitHead": "80493654847c4477425d75fcb393f1a7d13af56e"
35
+ "gitHead": "0db3b3aa55fbddec24ead07ee8643b87af4688c5"
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAG/D,OAAO,EACL,KAAK,EACL,eAAe,EACf,qBAAqB,EACrB,QAAQ,EACR,SAAS,EACV,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE/E,OAA0B,EAExB,UAAU,EACX,MAAM,cAAc,CAAC;AAKtB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AAExB,eAAO,MAAM,eAAe,oCAAmB,CAAC;AAChD,eAAO,MAAM,kBAAkB,8CAAsB,CAAC;AAEtD,YAAY,EACV,UAAU,EACV,KAAK,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,QAAQ,EACR,UAAU,EACV,SAAS,GACV,CAAC;AAEF,eAAO,MAAM,cAAc,4CACkC,CAAC;AAE9D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,qBAAqB,CA6KxE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAOA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