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:
1 parent
4ac3f6754b
commit
5568558b50
1 file changed
+1
-1
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user