chore: 修正一個不合理的 uri-list 轉換成功判斷

This commit is contained in:
CrescentLeaf
2025-10-02 20:51:07 +08:00
parent 20f12c97c1
commit 2af396a2b8

View File

@@ -353,7 +353,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
// 即便是 no-cors 還是殘廢, 因此暫時沒有什麽想法
const re = await fetch(url)
const type = re.headers.get("Content-Type")
if (type?.startsWith("image/"))
if (type && re.ok)
addFile(type as string, getFileNameOrRandom(url), re)
} catch (e) {
snackbar({