@constructor-io/constructorio-client-javascript 2.58.0 → 2.58.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/lib/constructorio.js +6 -3
- package/lib/utils/store.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/lib/constructorio.js
CHANGED
|
@@ -163,8 +163,7 @@ var ConstructorIO = /*#__PURE__*/function () {
|
|
|
163
163
|
segments = options.segments,
|
|
164
164
|
testCells = options.testCells,
|
|
165
165
|
sessionId = options.sessionId,
|
|
166
|
-
|
|
167
|
-
userId = _options$userId === void 0 ? '' : _options$userId;
|
|
166
|
+
userId = options.userId;
|
|
168
167
|
if (apiKey) {
|
|
169
168
|
this.options.apiKey = apiKey;
|
|
170
169
|
}
|
|
@@ -179,7 +178,11 @@ var ConstructorIO = /*#__PURE__*/function () {
|
|
|
179
178
|
if (sessionId && !helpers.canUseDOM()) {
|
|
180
179
|
this.options.sessionId = sessionId;
|
|
181
180
|
}
|
|
182
|
-
|
|
181
|
+
|
|
182
|
+
// If User ID is passed
|
|
183
|
+
if ('userId' in options) {
|
|
184
|
+
this.options.userId = userId;
|
|
185
|
+
}
|
|
183
186
|
}
|
|
184
187
|
}
|
|
185
188
|
}]);
|
package/lib/utils/store.js
CHANGED
|
@@ -9,7 +9,7 @@ function canUseStorage(type) {
|
|
|
9
9
|
storage.removeItem(x);
|
|
10
10
|
return true;
|
|
11
11
|
} catch (e) {
|
|
12
|
-
return e instanceof DOMException && (e.name === 'QuotaExceededError' || e.name === 'QUOTA_EXCEEDED_ERR' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED' || e.toString().indexOf('QUOTA_EXCEEDED_ERR') !== -1 || e.toString().indexOf('QuotaExceededError') !== -1) && storage && storage.length !== 0;
|
|
12
|
+
return typeof DOMException !== 'undefined' && e instanceof DOMException && (e.name === 'QuotaExceededError' || e.name === 'QUOTA_EXCEEDED_ERR' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED' || e.toString().indexOf('QUOTA_EXCEEDED_ERR') !== -1 || e.toString().indexOf('QuotaExceededError') !== -1) && storage && storage.length !== 0;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
var session = {
|
package/lib/version.js
CHANGED