Skip to content

Commit 76b835b

Browse files
authored
Merge pull request #1625 from GetStream/develop
v9.1.2
2 parents 37ed5e9 + df7c863 commit 76b835b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/MessageList/hooks/useScrollLocationLogic.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import type { StreamMessage } from '../../../context/ChannelStateContext';
77

88
import type { DefaultStreamChatGenerics } from '../../../types/types';
99

10-
const ResizeObserver = window.ResizeObserver || Polyfill;
10+
const isBrowser = typeof window !== 'undefined';
11+
const ResizeObserver = (isBrowser && window.ResizeObserver) || Polyfill;
1112

1213
export type UseScrollLocationLogicParams<
1314
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics

0 commit comments

Comments
 (0)