From b2664a00d53570b65f1a08316c899c1462bde8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4rtl?= Date: Tue, 4 Feb 2025 14:42:57 +0100 Subject: [PATCH] Check variants for undefined values --- src/logic/uimodel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"]; }