Skip to content

Commit

Permalink
Fixes model selection if glTF flavor does not exist
Browse files Browse the repository at this point in the history
Fixes #575
  • Loading branch information
UX3D-haertl committed Sep 3, 2024
1 parent 4909586 commit 567b2e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/logic/uimodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ class UIModel
filter(value => value !== null),
map(value => {
app.flavours = modelPathProvider.getModelFlavours(value);
app.selectedFlavour = "glTF";
if (app.flavours.includes("glTF")){
app.selectedFlavour = "glTF";
} else {
app.selectedFlavour = app.flavours[0];
}
return modelPathProvider.resolve(value, app.selectedFlavour);
}),
map(value => ({mainFile: value})),
Expand Down

0 comments on commit 567b2e3

Please sign in to comment.