fix: clear GhostMaps outage state on unchanged-head recovery

This commit is contained in:
Mazeyar Moeini Feizabadi committed 2026-10-22 02:42:26 +02:00
1 parent d5c49d35e8
commit cb11e7dac8
4 files changed
+62 -1

No files matched your search

+7 -1
View File
@@ -172,7 +172,13 @@ export function createGhostMapsWatcher({
await loadDisk();
const head = await readHead();
state.checkedAt = now();
if (head === state.commit) return false;
if (head === state.commit) {
if (state.error !== null) {
state.error = null;
emit();
}
return false;
}
const next = await readCommit(head);
const previous = new Map(state.products.map((p) => [p.id, p.version]));
const changed = next.products