We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7199c76 commit 63c7448Copy full SHA for 63c7448
src/components/TodoList.ts
@@ -1,5 +1,4 @@
1
import { setItem } from "../utils/storage.js";
2
-import validation from "../utils/validation.js";
3
import { TodoList as TodoLi } from "../types/todo.js";
4
5
export default class TodoList {
@@ -18,10 +17,9 @@ export default class TodoList {
18
17
}
19
20
setState(nextState: TodoLi) {
21
- const newState = validation.state(nextState);
22
- this.state = newState;
23
- setItem("todo", JSON.stringify(newState));
24
- this.updateCount(newState);
+ this.state = nextState;
+ setItem("todo", JSON.stringify(nextState));
+ this.updateCount(nextState);
25
this.render();
26
};
27
0 commit comments