Skip to content

Commit d732e33

Browse files
committed
fix: tests issues
1 parent fa943f4 commit d732e33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package/src/components/ChannelList/hooks/listeners/useNewMessage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const useNewMessage = <
5858
(isTargetChannelPinned && considerPinnedChannels) ||
5959
lockChannelOrder
6060
) {
61-
return channels;
61+
return [...channels];
6262
}
6363

6464
// If channel doesn't exist in existing list, check in activeChannels as well.
@@ -77,7 +77,7 @@ export const useNewMessage = <
7777
// When archived filter true, and channel is not archived
7878
(isArchivedFilterTrue && !isChannelArchived(channelToMove))
7979
) {
80-
return channels;
80+
return [...channels];
8181
}
8282
return moveChannelUp<StreamChatGenerics>({
8383
channels,

0 commit comments

Comments
 (0)