Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

don't try to set selected bone name if it is null

Scott Petrovicbaffb3adff90
diff --git a/src/lib/EventListeners.ts b/src/lib/EventListeners.ts
index e05d5b6..78546bb 100644
--- a/src/lib/EventListeners.ts
+++ b/src/lib/EventListeners.ts
@@ -17,7 +17,8 @@ export class EventListeners {
this.bootstrap.handle_transform_controls_mouse_down(event)
// update UI with current bone name
- if (this.bootstrap.ui.dom_selected_bone_label !== null) {
+ if (this.bootstrap.ui.dom_selected_bone_label !== null &&
+ this.bootstrap.edit_skeleton_step.get_currently_selected_bone() !== null) {
this.bootstrap.ui.dom_selected_bone_label.innerHTML =
this.bootstrap.edit_skeleton_step.get_currently_selected_bone().name
}