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 {