mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 18:48:31 +01:00
処理一生終わらない問題を修正
This commit is contained in:
parent
2ea02051a1
commit
7c015b78c5
1 changed files with 8 additions and 0 deletions
|
@ -237,6 +237,10 @@ export function applyWatermark(img: string | Blob, el: HTMLCanvasElement | Offsc
|
||||||
resolve();
|
resolve();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
watermark.onerror = () => {
|
||||||
|
resolve();
|
||||||
|
};
|
||||||
|
|
||||||
let watermarkUrl: string;
|
let watermarkUrl: string;
|
||||||
if (config.fileUrl == null && config.fileId != null) {
|
if (config.fileUrl == null && config.fileId != null) {
|
||||||
const res = await misskeyApi('drive/files/show', { fileId: config.fileId });
|
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') {
|
if (typeof img === 'string') {
|
||||||
imgEl.src = img;
|
imgEl.src = img;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue