diff --git a/packages/hooks/use-event-listener/src/index.ts b/packages/hooks/use-event-listener/src/index.ts index b559c90..037d55f 100644 --- a/packages/hooks/use-event-listener/src/index.ts +++ b/packages/hooks/use-event-listener/src/index.ts @@ -1,5 +1,9 @@ import { type RefObject, useEffect, useRef } from 'react'; +export const _window = typeof window !== 'undefined' ? window : global.window; +export const _document = + typeof document !== 'undefined' ? document : global.document; + export const useEventListener = ( target: RefObject | EventTarget, eventType: T,