Skip to content

Commit f7fe1af

Browse files
fix(lottie): harden SSR check to exclude react-native (#424)
1 parent e6653ce commit f7fe1af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libs/lottie.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const lottie = /* @__PURE__ */ (() => {
22
if (
3-
typeof navigator === 'undefined' ||
4-
typeof document === 'undefined' ||
3+
typeof navigator === 'undefined' || navigator.product === 'ReactNative' ||
4+
typeof document === 'undefined' || typeof document.getElementsByTagName !== 'function' || typeof document.createElement !== 'function' ||
55
typeof CanvasRenderingContext2D === 'undefined'
66
)
77
return {}

0 commit comments

Comments
 (0)