mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
style: add @typescript-eslint/return-await rule (#9612)
This commit is contained in:
@@ -91,7 +91,7 @@ async function resizeImage(blob: Blob | File): Promise<Blob | null> {
|
||||
if (ctx) {
|
||||
ctx.imageSmoothingQuality = 'high';
|
||||
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
||||
return new Promise(resolve =>
|
||||
return await new Promise(resolve =>
|
||||
canvas.toBlob(blob => resolve(blob), 'image/jpeg', 0.8)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user