editor: reset button actually resets state

This commit is contained in:
Vašek Šraier 2020-10-23 14:52:39 +02:00
parent 013f805128
commit 9adb587247

View file

@ -4,7 +4,7 @@
import Graph from "./Graph.svelte"; import Graph from "./Graph.svelte";
import { nonNull, saveToLocalDisk } from "./helpers"; import { nonNull, saveToLocalDisk } from "./helpers";
import type { TaskDescriptor, TasksFile } from "./tasks"; import type { TaskDescriptor, TasksFile } from "./tasks";
import { resetTasks, saveTasks, getCategories, tasksToString } from "./tasks"; import { loadTasks, resetTasks, saveTasks, getCategories, tasksToString } from "./tasks";
import TaskDisplay from "./TaskDisplay.svelte"; import TaskDisplay from "./TaskDisplay.svelte";
import TaskDetailEditor from "./TaskDetailEditor.svelte"; import TaskDetailEditor from "./TaskDetailEditor.svelte";
import { forceSimulation } from "./force-simulation"; import { forceSimulation } from "./force-simulation";
@ -72,7 +72,8 @@
async function resetCurrentState() { async function resetCurrentState() {
await resetTasks().catch((val) => { await resetTasks().catch((val) => {
alert(val); alert(val);
}); })
tasks = await loadTasks();
} }
// autosave ;) // autosave ;)