@inglorious/logo 2.0.15 → 2.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/logo",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "The Inglorious Coderz logo, remade to be compatible with Inglorious Web.",
5
5
  "author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
package/src/handlers.js CHANGED
@@ -53,6 +53,9 @@ export const logo = {
53
53
  }
54
54
 
55
55
  export function startInteraction(entity, api) {
56
+ // skip during SSX
57
+ if (typeof document === "undefined") return
58
+
56
59
  moveListener = createMoveListener(entity.id, api)
57
60
  document.addEventListener(eventType, moveListener, {
58
61
  passive: !entity.isScrollPrevented,
@@ -60,6 +63,9 @@ export function startInteraction(entity, api) {
60
63
  }
61
64
 
62
65
  export function stopInteraction() {
66
+ // skip during SSX
67
+ if (typeof document === "undefined") return
68
+
63
69
  document.removeEventListener(eventType, moveListener)
64
70
  }
65
71
 
package/src/utils.js CHANGED
@@ -1,4 +1,7 @@
1
1
  export function isTouchDevice() {
2
+ // skip during SSX
3
+ if (typeof window === "undefined") return false
4
+
2
5
  if (
3
6
  "ontouchstart" in window ||
4
7
  (window.DocumentTouch && document instanceof window.DocumentTouch)