mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 07:12:36 -05:00
Don't modify chat messages array in place
This commit is contained in:
@@ -402,7 +402,7 @@ function ChatProviderInner({
|
||||
|
||||
const messagesForRoom = React.useCallback(
|
||||
(chatCode: string) => {
|
||||
return (messagesByRoom[chatCode] ?? []).sort(
|
||||
return (messagesByRoom[chatCode] ?? []).toSorted(
|
||||
(a, b) => a.timestamp - b.timestamp,
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user