Fix target metrics showing --- by scoping querySelector to targets panel
The dashboard panel appears before the targets panel in the DOM and both use data-target-id. document.querySelector was finding the dashboard element (which has no data-tm children) instead of the target card. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -736,7 +736,9 @@ function _buildLedTimingHTML(state) {
|
||||
}
|
||||
|
||||
function _patchTargetMetrics(target) {
|
||||
const card = document.querySelector(`[data-target-id="${target.id}"]`);
|
||||
const container = document.getElementById('targets-panel-content');
|
||||
if (!container) return;
|
||||
const card = container.querySelector(`[data-target-id="${target.id}"]`);
|
||||
if (!card) return;
|
||||
const state = target.state || {};
|
||||
const metrics = target.metrics || {};
|
||||
|
||||
Reference in New Issue
Block a user