mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
fix: assistant topic not exist
This commit is contained in:
parent
0ccb92e7f6
commit
f615a5688f
@ -7,7 +7,7 @@ export function useActiveTopic(assistant: Assistant) {
|
||||
|
||||
useEffect(() => {
|
||||
// activeTopic not in assistant.topics
|
||||
if (!find(assistant.topics, { id: activeTopic?.id })) {
|
||||
if (assistant && !find(assistant.topics, { id: activeTopic?.id })) {
|
||||
setActiveTopic(assistant.topics[0])
|
||||
}
|
||||
}, [activeTopic?.id, assistant])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user