From 7d2de36501946ca7f56fec9b349d86c06dc258e9 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Mon, 24 Jan 2022 02:18:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=82=A2=E3=83=83=E3=83=97=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=82=A8=E3=83=A9=E3=83=BC=E6=99=82=E3=81=AE?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E4=BF=AE=E6=AD=A3=20(#8182)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * アップロードのエラー応答で詰むのを修正 * CHANGELOG --- CHANGELOG.md | 1 + packages/client/src/os.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d01358b27..d7cd03541 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - Unifying Misskey-specific IRIs in JSON-LD `@context` ### Bugfixes +- アップロードエラー時の処理を修正 ## 12.101.1 (2021/12/29) diff --git a/packages/client/src/os.ts b/packages/client/src/os.ts index 378523e1b..c16ea717a 100644 --- a/packages/client/src/os.ts +++ b/packages/client/src/os.ts @@ -570,7 +570,7 @@ export function upload(file: File, folder?: any, name?: string): Promise { - if (ev.target == null || ev.target.response == null) { + if (xhr.status !== 200 || ev.target == null || ev.target.response == null) { // TODO: 消すのではなくて再送できるようにしたい uploads.value = uploads.value.filter(x => x.id != id);