fix: fatal: undefined is not an object (evaluating 'color.buffer')
This commit is contained in:
parent
83186b6fed
commit
b9b071c744
1 changed files with 1 additions and 0 deletions
|
|
@ -94,6 +94,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
|||
const agent = agents().find((x) => x.name === name)
|
||||
if (agent?.color) return RGBA.fromHex(agent.color)
|
||||
const index = agents().findIndex((x) => x.name === name)
|
||||
if (index === -1) return colors()[0]
|
||||
return colors()[index % colors().length]
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue