Skip to content

Commit 196ca03

Browse files
committed
Add new argument to ajust for change in index.html
1 parent 958fcfe commit 196ca03

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Sprint-3/todo-list/script.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ window.addEventListener("load", () => {
2121
function addNewTodo() {
2222
const taskInput = document.getElementById("new-task-input");
2323
const task = taskInput.value.trim();
24+
const deadlineInput = document.getElementById("new-task-deadline");
25+
const deadline = deadlineInput.value || null;
26+
2427
if (task) {
25-
Todos.addTask(todos, task, false);
28+
Todos.addTask(todos, task, false, deadline);
2629
render();
2730
}
2831

0 commit comments

Comments
 (0)