@builder.io/sdk 2.0.7 → 2.0.8

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.cjs.js CHANGED
@@ -24,21 +24,16 @@ var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash);
24
24
 
25
25
  var isSafari = typeof window !== 'undefined' &&
26
26
  /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);
27
+ var isClient = typeof window !== 'undefined';
27
28
  // TODO: queue all of these in a debounceNextTick
28
29
  function nextTick(fn) {
29
- // React native
30
- if (typeof setImmediate === 'function' && typeof window === 'undefined') {
31
- return setImmediate(fn);
32
- }
33
- // TODO: should this be setImmediate instead? Forgot if that is micro or macro task
34
- // TODO: detect specifically if is server
35
30
  // if (typeof process !== 'undefined' && process.nextTick) {
36
31
  // console.log('process.nextTick?');
37
32
  // process.nextTick(fn);
38
33
  // return;
39
34
  // }
40
35
  // FIXME: fix the real safari issue of this randomly not working
41
- if (isSafari || typeof MutationObserver === 'undefined') {
36
+ if (!isClient || isSafari || typeof MutationObserver === 'undefined') {
42
37
  setTimeout(fn);
43
38
  return;
44
39
  }
@@ -131,7 +126,7 @@ function assertAllowedPropertyName(name) {
131
126
  throw new Error("Property name \"".concat(name, "\" is not allowed"));
132
127
  }
133
128
 
134
- var version = "2.0.6";
129
+ var version = "2.0.7";
135
130
 
136
131
  var Subscription = /** @class */ (function () {
137
132
  function Subscription(listeners, listener) {