fix image uploads being broken

This commit is contained in:
Bruno Windels 2021-03-11 10:27:50 +01:00
parent e79e4b525d
commit 8100c70e88

View file

@ -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;
} }