mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 22:13:47 +08:00
follow the rabbit to fix potential issues
This commit is contained in:
@@ -1122,12 +1122,11 @@ function _Chat() {
|
||||
};
|
||||
|
||||
const updateMessageAudio = (msgId?: string, audio_url?: string) => {
|
||||
chatStore.updateCurrentSession(
|
||||
(session) =>
|
||||
(session.messages = session.messages.map((m) =>
|
||||
m.id === msgId ? { ...m, audio_url } : m,
|
||||
)),
|
||||
);
|
||||
chatStore.updateCurrentSession((session) => {
|
||||
session.messages = session.messages.map((m) =>
|
||||
m.id === msgId ? { ...m, audio_url } : m,
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const onDelete = (msgId: string) => {
|
||||
@@ -1903,7 +1902,6 @@ function _Chat() {
|
||||
)}
|
||||
{message.audio_url && (
|
||||
<audio
|
||||
id="audio"
|
||||
preload="auto"
|
||||
controls
|
||||
className={styles["chat-message-item-audio"]}
|
||||
|
||||
Reference in New Issue
Block a user