docs(model): clarify the switchTo last-good reset comment
This commit is contained in:
@@ -119,8 +119,9 @@ export function useMacroplan() {
|
|||||||
// Persist the whole library on any change (best-effort, like the old autosave).
|
// Persist the whole library on any change (best-effort, like the old autosave).
|
||||||
watch(lib, (l) => save(l), { deep: true })
|
watch(lib, (l) => save(l), { deep: true })
|
||||||
|
|
||||||
// Switching plans drops the prior render so a broken target shows its own
|
// Reset last-good to the target plan's current parse (null if it's broken),
|
||||||
// error/empty state, not the previous plan's grid.
|
// so switching to a broken plan shows its own error/empty state rather than
|
||||||
|
// the previous plan's grid.
|
||||||
function switchTo(id: string): void {
|
function switchTo(id: string): void {
|
||||||
lib.value.activeId = id
|
lib.value.activeId = id
|
||||||
lastGood.value = parsed.value.plan
|
lastGood.value = parsed.value.plan
|
||||||
|
|||||||
Reference in New Issue
Block a user