fix: add null check for chatStore.conversations in StickyModeHeader
Optional chaining prevents TypeError when test mocks don't provide conversations array.
This commit is contained in:
parent
b98e7cb42f
commit
44f4f1c46f
|
|
@ -159,7 +159,7 @@ const allExperts = computed<IExpertDisplay[]>(() => {
|
|||
// 中保存的 YAML color。
|
||||
const liveColorByName = new Map<string, string>()
|
||||
const liveAvatarByName = new Map<string, string>()
|
||||
const conv = chatStore.conversations.find(
|
||||
const conv = chatStore.conversations?.find(
|
||||
(c: { id: string; messages?: unknown[] }) => c.id === chatStore.currentConversationId,
|
||||
)
|
||||
if (conv?.messages) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue