diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 3f1114e..7902ce2 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -384,7 +384,7 @@ export default function ChatBOX(props: { return; } t.name = name; - setTemplates([...templates]); + setTemplates(structuredClone(templates)); }} > 🖋 @@ -397,7 +397,7 @@ export default function ChatBOX(props: { return; } templates.splice(index, 1); - setTemplates([...templates]); + setTemplates(structuredClone(templates)); }} > ❌