Skip to content

Commit

Permalink
処理一生終わらない問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Dec 17, 2024
1 parent 2ea0205 commit 7c015b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/frontend/src/scripts/watermark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand All @@ -256,6 +260,10 @@ export function applyWatermark(img: string | Blob, el: HTMLCanvasElement | Offsc
}
};

imgEl.onerror = () => {
resolve();
};

if (typeof img === 'string') {
imgEl.src = img;
} else {
Expand Down

0 comments on commit 7c015b7

Please sign in to comment.