chore: harden local schema hints and tests

This commit is contained in:
Ryan Di
2026-03-20 19:33:01 +11:00
parent eda7c8d6e9
commit 8168d46f87
4 changed files with 80 additions and 9 deletions
+6 -1
View File
@@ -87,9 +87,14 @@ const saveDataStateToLocalStorage = (
_appState.openSidebar = null;
}
const persistedElements = getNonDeletedElements(elements).map((element) => ({
...element,
schemaVersion: SCHEMA_VERSIONS.latest,
}));
localStorage.setItem(
STORAGE_KEYS.LOCAL_STORAGE_ELEMENTS,
JSON.stringify(getNonDeletedElements(elements)),
JSON.stringify(persistedElements),
);
localStorage.setItem(
STORAGE_KEYS.LOCAL_STORAGE_APP_STATE,