mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-08 09:12:29 +08:00
fix - not clearing the loading state (#524)
This commit is contained in:
@@ -347,6 +347,12 @@ export function ChatInput({
|
||||
|
||||
setShowUrlDialog(false)
|
||||
} catch (error) {
|
||||
// Remove the URL from the data map on error
|
||||
const newUrlData = urlData
|
||||
? new Map(urlData)
|
||||
: new Map<string, UrlData>()
|
||||
newUrlData.delete(url)
|
||||
onUrlChange(newUrlData)
|
||||
showErrorToast(
|
||||
<span className="text-muted-foreground">
|
||||
{error instanceof Error
|
||||
|
||||
Reference in New Issue
Block a user