Skip to content

Some issues #1

@epeleh

Description

@epeleh

form.addEventListener('click', removeTask);

The task removal logic doesn't work at all. Should be: taskList.addEventListener('click', removeTask);


if (taskInput.value === "") {
alert("Add a task");
}

There should be a return statement after the alert


e.preventDefault();

Because of the conditional branching above, this line might be skipped. So let's move it to the top of the function


<ul class="collection">
<a href="#" class="clear-tasks btn black" id="clearme">
Clear Tasks
</a>
</ul>

The clear-tasks button deletes itself when you click on it. So it should be changed to:

    <a href="#" class="clear-tasks btn black" id="clearme">
        Clear Tasks
    </a>
    <ul class="collection">
    </ul>

e.preventDefault();

app_es6.js:56 Uncaught ReferenceError: e is not defined
    at UI.showAlert (app_es6.js:56:9)
    at HTMLFormElement.<anonymous> (app_es6.js:94:12)
showAlert @ app_es6.js:56
(anonymous) @zapp_es6.js:94

e.preventDefault();

The page reloads and all books are cleared after the submit button is pressed: the logic of the app is broken. preventDefault should be placed at the top of the function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions