@dynamic-labs/utils 0.18.29 → 0.18.30

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/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ### [0.18.30](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.29...v0.18.30) (2023-11-27)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * handle origin_check message from authWindow ([#3992](https://github.com/dynamic-labs/DynamicAuth/issues/3992)) ([1f35594](https://github.com/dynamic-labs/DynamicAuth/commit/1f35594fa3b0e10d3e1c6102b82606117a2265e1))
8
+ * null safe check to window object ([#3886](https://github.com/dynamic-labs/DynamicAuth/issues/3886)) ([37b4d36](https://github.com/dynamic-labs/DynamicAuth/commit/37b4d361b61f1045b7a0dc42359eb6cc1ce1b659))
9
+
2
10
  ### [0.18.29](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.28...v0.18.29) (2023-11-13)
3
11
 
4
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "0.18.29",
3
+ "version": "0.18.30",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -26,8 +26,8 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/logger": "0.18.29",
30
- "@dynamic-labs/types": "0.18.29"
29
+ "@dynamic-labs/logger": "0.18.30",
30
+ "@dynamic-labs/types": "0.18.30"
31
31
  },
32
32
  "peerDependencies": {}
33
33
  }
package/src/isMobile.cjs CHANGED
@@ -44,7 +44,9 @@ const isAndroid = () => isMobile() && !isIOS();
44
44
  const isLegacySafari = () => {
45
45
  // We need to check if window.CSS exists and if it has supports function.
46
46
  // We can use it only in browsers. This prevents customer tests from failing because of that.
47
- if (!window.CSS || typeof window.CSS.supports !== 'function') {
47
+ if (typeof window === 'undefined' ||
48
+ !window.CSS ||
49
+ typeof window.CSS.supports !== 'function') {
48
50
  return false;
49
51
  }
50
52
  // Older versions of Safari <15 are not supporting aspect-ratio css property.
package/src/isMobile.js CHANGED
@@ -40,7 +40,9 @@ const isAndroid = () => isMobile() && !isIOS();
40
40
  const isLegacySafari = () => {
41
41
  // We need to check if window.CSS exists and if it has supports function.
42
42
  // We can use it only in browsers. This prevents customer tests from failing because of that.
43
- if (!window.CSS || typeof window.CSS.supports !== 'function') {
43
+ if (typeof window === 'undefined' ||
44
+ !window.CSS ||
45
+ typeof window.CSS.supports !== 'function') {
44
46
  return false;
45
47
  }
46
48
  // Older versions of Safari <15 are not supporting aspect-ratio css property.