diff --git a/src/logic/uimodel.js b/src/logic/uimodel.js index f4c2bf9c..74104f5b 100644 --- a/src/logic/uimodel.js +++ b/src/logic/uimodel.js @@ -203,7 +203,7 @@ class UIModel this.app.selectedAnimations = state.animationIndices; if (gltf && gltf.variants) { - this.app.materialVariants = ["None", ...gltf.variants.map(variant => variant.name)]; + this.app.materialVariants = ["None", ...gltf.variants.map(variant => variant?.name ?? "Unnamed")]; } else { this.app.materialVariants = ["None"]; }