From 7c015b78c58f6cc79680472b985d7cdf083a26f6 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:54:42 +0900 Subject: [PATCH] =?UTF-8?q?=E5=87=A6=E7=90=86=E4=B8=80=E7=94=9F=E7=B5=82?= =?UTF-8?q?=E3=82=8F=E3=82=89=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/watermark.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/frontend/src/scripts/watermark.ts b/packages/frontend/src/scripts/watermark.ts index 04b1f4098f..1ce675c25e 100644 --- a/packages/frontend/src/scripts/watermark.ts +++ b/packages/frontend/src/scripts/watermark.ts @@ -237,6 +237,10 @@ export function applyWatermark(img: string | Blob, el: HTMLCanvasElement | Offsc resolve(); }; + watermark.onerror = () => { + resolve(); + }; + let watermarkUrl: string; if (config.fileUrl == null && config.fileId != null) { const res = await misskeyApi('drive/files/show', { fileId: config.fileId }); @@ -256,6 +260,10 @@ export function applyWatermark(img: string | Blob, el: HTMLCanvasElement | Offsc } }; + imgEl.onerror = () => { + resolve(); + }; + if (typeof img === 'string') { imgEl.src = img; } else {