Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some issues #1

Open
epeleh opened this issue May 1, 2023 · 1 comment
Open

Some issues #1

epeleh opened this issue May 1, 2023 · 1 comment

Comments

@epeleh
Copy link

epeleh commented May 1, 2023

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

@Laraib-Azmat
Copy link

Can You assign me this? i can resolve your issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants