Skip to content

Commit 0e21843

Browse files
committed
Deploying to main from @ KhronosGroup/glTF-Sample-Viewer@82ee065 🚀
1 parent 5d7d97b commit 0e21843

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/GltfSVApp.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21410,7 +21410,17 @@ class UIModel {
2141021410
});
2141121411

2141221412
let droppedGLtfFileName = inputObservables.droppedGltf.pipe(
21413-
map((droppedGltf) => droppedGltf.mainFile.name)
21413+
map((droppedGltf) => {
21414+
// Right now mainFile should always be an array of length.
21415+
// The first element is just the filename as string, the second element is the File object.
21416+
// To prevent potential errors where this might not be the case,
21417+
// we have this if and return undefined
21418+
if (droppedGltf.mainFile.length > 1) {
21419+
return droppedGltf.mainFile[1].name;
21420+
} else {
21421+
return undefined;
21422+
}
21423+
})
2141421424
);
2141521425

2141621426
if (modelURL !== null) {

docs/GltfSVApp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)