fix(status): preserve cached aircraft age and independent refresh errors

This commit is contained in:
Sameh Khamis committed 2026-09-12 17:12:34 -07:00
1 parent 8eb6d09105
commit dae5f45426
9 files changed
+174 -14

No files matched your search

+2 -3
View File
@@ -26,9 +26,8 @@ export function normalizeLayerLoading(layer = {}) {
// normal operation, never a batch failure — mirrors layerFeedState's carve-out
// so a prompt stored alongside the status cannot turn the chip red.
const guidance = GUIDANCE_STATUSES.includes(status);
const error = stoppingInstallations || guidance
? null
: stats.error || stats.lastError || stats.managerRefreshError || null;
const error = stoppingInstallations ? null
: (!guidance && stats.error) || stats.lastError || stats.managerRefreshError || null;
const unavailable = !stoppingInstallations && (stats.unavailable === true
|| stats.available === false
|| ['unavailable', 'offline', 'down', 'error'].includes(status));