mirror of
https://github.com/morgan9e/chatgpt-web
synced 2026-04-14 00:14:04 +09:00
simplify deleteChat logic
This commit is contained in:
@@ -50,8 +50,6 @@
|
||||
|
||||
export const deleteChat = (chatId: number) => {
|
||||
const chats = get(chatsStorage)
|
||||
const chatIndex = chats.findIndex((chat) => chat.id === chatId)
|
||||
chats.splice(chatIndex, 1)
|
||||
chatsStorage.set(chats)
|
||||
chatsStorage.set(chats.filter((chat) => chat.id !== chatId))
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user