From 377f03daca30759fedf9a4ff8e494fa899e11781 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 19 Nov 2023 04:59:28 +0400 Subject: [PATCH] fix: don't export empty texture --- modules/io/export.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/io/export.js b/modules/io/export.js index 4951bde6..d9011b45 100644 --- a/modules/io/export.js +++ b/modules/io/export.js @@ -253,8 +253,8 @@ async function getMapURL(type, options = {}) { { // replace texture href to base64 const image = cloneEl.querySelector("#texture > image"); - if (image) { - const href = image.getAttribute("href"); + const href = image?.getAttribute("href"); + if (href) { await new Promise(resolve => { getBase64(href, base64 => { image.setAttribute("href", base64);