From 7cdab010b36702acb90aa2fd1a619d63c6448078 Mon Sep 17 00:00:00 2001 From: Henrik Muehe Date: Sun, 3 May 2026 10:26:36 +0200 Subject: [PATCH] axis-vars: guard motor lookup for synthetic motor 4 _compute_axis indexed config.motors[motor_id] directly without checking the array length. For motor_id=4 (the synthetic external- axis motor used by ExternalAxis) there is no entry in config.motors, so motor was undefined and motor["homing-mode"] threw - which made the entire 'a' computed prop return undefined and the A row never rendered. Default to {} when the index is out of bounds. --- src/js/axis-vars.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/axis-vars.js b/src/js/axis-vars.js index cafd7c5..7e47e1e 100644 --- a/src/js/axis-vars.js +++ b/src/js/axis-vars.js @@ -56,7 +56,12 @@ module.exports = { const abs = this.state[`${axis}p`] || 0; const off = this.state[`offset_${axis}`]; const motor_id = this._get_motor_id(axis); - const motor = motor_id == -1 ? {} : this.config.motors[motor_id]; + // motor_id may be 4 for the synthetic external-axis motor; + // there is no entry for it in config.motors so guard with + // an empty object to avoid undefined property access. + const motor = (motor_id == -1 + ? {} + : (this.config.motors[motor_id] || {})); const enabled = this._check_is_enabled(axis); const homingMode = motor["homing-mode"]; const homed = this.state[`${motor_id}homed`];