We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 37ed5e9 + df7c863 commit 76b835bCopy full SHA for 76b835b
src/components/MessageList/hooks/useScrollLocationLogic.tsx
@@ -7,7 +7,8 @@ import type { StreamMessage } from '../../../context/ChannelStateContext';
7
8
import type { DefaultStreamChatGenerics } from '../../../types/types';
9
10
-const ResizeObserver = window.ResizeObserver || Polyfill;
+const isBrowser = typeof window !== 'undefined';
11
+const ResizeObserver = (isBrowser && window.ResizeObserver) || Polyfill;
12
13
export type UseScrollLocationLogicParams<
14
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
0 commit comments