We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 762e1e4 commit 26d1090Copy full SHA for 26d1090
src/domains/recommend/components/ChatList.tsx
@@ -21,7 +21,8 @@ function ChatList({
21
>
22
<div className="max-w-1024 w-full flex flex-col gap-5">
23
{messages.map((msg, i) => {
24
- const keyId = msg.id ?? `temp-${msg.sender}-${i}-${Date.now()}`;
+ const keyId =
25
+ !msg.id || msg.id === 'null' ? `temp-${msg.sender}-${i}-${Math.random()}` : msg.id;
26
const prevMsg = messages[i - 1];
27
const showProfile = !prevMsg || prevMsg.sender !== msg.sender;
28
0 commit comments