Skip to content

Commit

Permalink
fix: error when used on server side via SVGRenderer (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrSensor authored Jan 19, 2025
1 parent 1399589 commit 5b1448e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libs/lottie.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
const lottie = /* @__PURE__ */ (() => {
if (typeof navigator === 'undefined' || typeof document === 'undefined') return {}
if (
typeof navigator === 'undefined' ||
typeof document === 'undefined' ||
typeof CanvasRenderingContext2D === 'undefined'
)
return {}

const svgNS = 'http://www.w3.org/2000/svg'

Expand Down

0 comments on commit 5b1448e

Please sign in to comment.