@builder.io/sdk 1.1.24 → 1.1.26

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.umd.js CHANGED
@@ -73,7 +73,7 @@
73
73
  element.data = String((called = ++called));
74
74
  }
75
75
 
76
- var PROPERTY_NAME_DENY_LIST = Object.freeze(['__proto__', 'prototype']);
76
+ var PROPERTY_NAME_DENY_LIST = Object.freeze(['__proto__', 'prototype', 'constructor']);
77
77
  // TODO: unit tests
78
78
  var QueryString = /** @class */ (function () {
79
79
  function QueryString() {
@@ -117,7 +117,7 @@
117
117
  QueryString.deepen = function (map) {
118
118
  // FIXME; Should be type Tree = Record<string, string | Tree>
119
119
  // requires a typescript upgrade.
120
- var output = Object.create(null);
120
+ var output = {};
121
121
  for (var k in map) {
122
122
  var t = output;
123
123
  var parts = k.split('.');
@@ -125,7 +125,7 @@
125
125
  for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
126
126
  var part = parts_1[_i];
127
127
  assertAllowedPropertyName(part);
128
- t = t[part] = t[part] || Object.create(null);
128
+ t = t[part] = t[part] || {};
129
129
  }
130
130
  t[key] = map[k];
131
131
  }
@@ -152,7 +152,7 @@
152
152
  throw new Error("Property name \"" + name + "\" is not allowed");
153
153
  }
154
154
 
155
- var version = "1.1.23";
155
+ var version = "1.1.25";
156
156
 
157
157
  var Subscription = /** @class */ (function () {
158
158
  function Subscription(listeners, listener) {
@@ -1535,6 +1535,7 @@
1535
1535
  }
1536
1536
  };
1537
1537
  Builder.prototype.getSessionId = function () {
1538
+ var _this = this;
1538
1539
  var sessionId = null;
1539
1540
  try {
1540
1541
  if (Builder.isBrowser && typeof sessionStorage !== 'undefined') {
@@ -1550,7 +1551,16 @@
1550
1551
  }
1551
1552
  // Give the app a second to start up and set canTrack to false if needed
1552
1553
  if (Builder.isBrowser) {
1553
- this.setCookie(sessionStorageKey, sessionId, datePlusMinutes(30));
1554
+ setTimeout(function () {
1555
+ try {
1556
+ if (_this.canTrack) {
1557
+ _this.setCookie(sessionStorageKey, sessionId, datePlusMinutes(30));
1558
+ }
1559
+ }
1560
+ catch (err) {
1561
+ console.debug('Cookie setting error', err);
1562
+ }
1563
+ });
1554
1564
  }
1555
1565
  return sessionId;
1556
1566
  };