From c2cac19f7e7bffe3a2ec7ebd5bc95cf12293f6be Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 26 Mar 2026 16:21:57 +0800 Subject: [PATCH] fix(points): ensure equipment map is loaded before rendering point list loadPoints() relies on state.equipmentMap to display bound equipment names. Running it in parallel with loadEquipments() caused a race condition where points rendered before the map was populated, showing all as "Unbound". Co-Authored-By: Claude Sonnet 4.6 --- web/js/app.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/web/js/app.js b/web/js/app.js index b5025f7..552c249 100644 --- a/web/js/app.js +++ b/web/js/app.js @@ -63,12 +63,10 @@ function switchView(view) { startLogs(); if (!_configLoaded) { _configLoaded = true; - withStatus(Promise.all([ - loadSources(), - loadEquipments(), - loadEvents(), - loadPoints(), - ])); + withStatus((async () => { + await Promise.all([loadSources(), loadEquipments(), loadEvents()]); + await loadPoints(); + })()); } } else { stopLogs();