fix: don't export empty texture

This commit is contained in:
Azgaar 2023-11-19 04:59:28 +04:00
parent c38aff758a
commit 377f03daca

View file

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