Skip to content

Commit 6ec31af

Browse files
authored
fix: merge mentionQueryParams.sort configuration correctly (#1869)
1 parent 923d8ef commit 6ec31af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/MessageInput/hooks/useUserTrigger.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ export const useUserTrigger = <
105105
id: { $ne: client.userID },
106106
...mentionQueryParams.filters,
107107
},
108-
{ id: 1, ...mentionQueryParams.sort },
108+
Array.isArray(mentionQueryParams.sort)
109+
? [{ id: 1 }, ...mentionQueryParams.sort]
110+
: { id: 1, ...mentionQueryParams.sort },
109111
{ limit: 10, ...mentionQueryParams.options },
110112
);
111113

0 commit comments

Comments
 (0)