Copy only string error toast descriptions

- Restrict the error copy button to string descriptions
- Avoid passing non-string toast content into the clipboard action
This commit is contained in:
Julius Marminge committed 2026-03-25 12:35:59 -07:00
1 parent 4ac3f6754b
commit 5568558b50
1 file changed
+1 -1
+1 -1
View File
@@ -311,7 +311,7 @@ function Toasts({ position = "top-right" }: { position: ToastPosition }) {
className="min-w-0 break-words font-medium"
data-slot="toast-title"
/>
{toast.type === "error" && toast.description && (
{toast.type === "error" && typeof toast.description === "string" && (
<CopyErrorButton text={toast.description} />
)}
</div>