Skip to content

Commit d0d185e

Browse files
resolve with null
1 parent d5b66eb commit d0d185e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/model/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,9 +1024,11 @@ let createCube = function (width, height, depth, name, faces, fallbackFaces, tex
10241024
img: img
10251025
};
10261026
if (!textures.hasOwnProperty(textureRef) || !textures[textureRef]) {
1027-
console.warn("Missing texture for " + textureRef)
1027+
console.warn("Missing texture for " + textureRef);
1028+
resolve(null);
1029+
} else {
1030+
img.src = textures[textureRef];
10281031
}
1029-
img.src = textures[textureRef];
10301032
}
10311033
}));
10321034
}

0 commit comments

Comments
 (0)