mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 10:20:27 +01:00
fix
This commit is contained in:
parent
579c570c53
commit
2ea02051a1
1 changed files with 6 additions and 2 deletions
|
@ -124,7 +124,7 @@ export function applyWatermark(img: string | Blob, el: HTMLCanvasElement | Offsc
|
|||
ctx.drawImage(imgEl, 0, 0);
|
||||
|
||||
if (config != null) {
|
||||
if (config.fileUrl) {
|
||||
if (config.fileUrl != null || config.fileId != null) {
|
||||
const watermark = new Image();
|
||||
watermark.onload = () => {
|
||||
const canvasAspectRatio = canvas.width / canvas.height; // 横長は1より大きい
|
||||
|
@ -247,8 +247,12 @@ export function applyWatermark(img: string | Blob, el: HTMLCanvasElement | Offsc
|
|||
watermarkUrl = config.fileUrl!;
|
||||
}
|
||||
|
||||
watermark.src = config.__bypassMediaProxy ? config.fileUrl : getProxiedImageUrl(watermarkUrl, undefined, true);
|
||||
watermark.src = config.__bypassMediaProxy ? watermarkUrl : getProxiedImageUrl(watermarkUrl, undefined, true);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue