diff --git a/src/gsap/hooks/useFlip/useFlip.ts b/src/gsap/hooks/useFlip/useFlip.ts index 69f14a3..aeff9b8 100644 --- a/src/gsap/hooks/useFlip/useFlip.ts +++ b/src/gsap/hooks/useFlip/useFlip.ts @@ -3,7 +3,9 @@ import Flip from 'gsap/Flip'; import { useEffect, useRef, type MutableRefObject } from 'react'; import { unref, type Unreffable } from '../../../utils/unref/unref.js'; -gsap.registerPlugin(Flip); +if (typeof window !== 'undefined') { + gsap.registerPlugin(Flip); +} export function useFlip( ref: Unreffable,