fix image uploads being broken
This commit is contained in:
parent
e79e4b525d
commit
8100c70e88
1 changed files with 0 additions and 2 deletions
|
@ -106,11 +106,9 @@ export function hasReadPixelPermission() {
|
||||||
|
|
||||||
async function loadImgFromBlob(blob) {
|
async function loadImgFromBlob(blob) {
|
||||||
const img = document.createElement("img");
|
const img = document.createElement("img");
|
||||||
let detach;
|
|
||||||
const loadPromise = domEventAsPromise(img, "load");
|
const loadPromise = domEventAsPromise(img, "load");
|
||||||
img.src = blob.url;
|
img.src = blob.url;
|
||||||
await loadPromise;
|
await loadPromise;
|
||||||
detach();
|
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue