Skip to content

Commit 079a363

Browse files
committed
chore: skip query call if isLoading true
1 parent c4561a0 commit 079a363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/uikit-chat-hooks/src/common/useUserList.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const useUserList = <
119119
});
120120

121121
const next = useFreshCallback(async () => {
122-
if (query.current && query.current?.hasNext) {
122+
if (query.current && query.current?.hasNext && !query.current.isLoading) {
123123
const nextUsers = await query.current.next().catch((e) => {
124124
Logger.error(e);
125125
if (e.code === SBErrorCode.UNAUTHORIZED_REQUEST) Logger.warn(SBErrorMessage.ACL);

0 commit comments

Comments
 (0)