core: fix "type" does not exist

This commit is contained in:
Abdullah Atta
2023-11-21 09:06:21 +05:00
parent 37c0107660
commit e705793e0a

View File

@@ -124,10 +124,10 @@ export function toBlobURL(dataurl: string, id?: string) {
if (id && OBJECT_URL_CACHE[id]) return OBJECT_URL_CACHE[id];
if (!isDataUrl(dataurl)) return;
const { data, mime } = DataURL.toObject(dataurl); //.split(",");
if (!data || !mime) return;
const { data, mimeType } = DataURL.toObject(dataurl); //.split(",");
if (!data || !mimeType) return;
const objectURL = URL.createObjectURL(
new Blob([Buffer.from(data, "base64")], { type: mime })
new Blob([Buffer.from(data, "base64")], { type: mimeType })
);
if (id) OBJECT_URL_CACHE[id] = objectURL;