1
0
mirror of https://github.com/morris/vanilla-todo.git synced 2025-08-21 05:11:20 +02:00
This commit is contained in:
Morris Brodersen
2024-06-23 17:03:30 +02:00
parent 5ab98c2740
commit 1bc68ef68a
3 changed files with 95 additions and 4 deletions

View File

@@ -44,7 +44,10 @@ export function TodoController(el) {
function load() {
try {
if (localStorage?.todo) {
todoData = { ...todoData, ...JSON.parse(localStorage.todo) };
todoData = TodoLogic.movePastTodoItems({
...todoData,
...JSON.parse(localStorage.todo),
});
}
} catch (err) {
// eslint-disable-next-line no-console