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 <noreply@anthropic.com>
This commit is contained in:
caoqianming 2026-03-26 16:21:57 +08:00
parent c1c70ed7f6
commit c2cac19f7e
1 changed files with 4 additions and 6 deletions

View File

@ -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();