chore: generate
This commit is contained in:
parent
562f067131
commit
f242541ef3
1 changed files with 1 additions and 3 deletions
|
|
@ -160,9 +160,7 @@ export function Autocomplete(props: {
|
||||||
|
|
||||||
props.setPrompt((draft) => {
|
props.setPrompt((draft) => {
|
||||||
if (part.type === "file") {
|
if (part.type === "file") {
|
||||||
const existingIndex = draft.parts.findIndex(
|
const existingIndex = draft.parts.findIndex((p) => p.type === "file" && "url" in p && p.url === part.url)
|
||||||
(p) => p.type === "file" && "url" in p && p.url === part.url,
|
|
||||||
)
|
|
||||||
if (existingIndex !== -1) {
|
if (existingIndex !== -1) {
|
||||||
const existing = draft.parts[existingIndex]
|
const existing = draft.parts[existingIndex]
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue