mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-04-18 15:31:17 -04:00
Merge branch 'main' into library
This commit is contained in:
commit
7237bcfd12
1 changed files with 3 additions and 1 deletions
|
@ -90,12 +90,14 @@ submitButton.addEventListener('click', event => {
|
|||
const title = document.querySelector('#title').value;
|
||||
const readBtn = document.querySelector('#read-button').checked;
|
||||
|
||||
|
||||
if (author === "" || title === "") {
|
||||
return
|
||||
}
|
||||
// create book object
|
||||
|
||||
const newBook = new Book(title, author, readBtn);
|
||||
|
||||
|
||||
addBookToLibrary(newBook);
|
||||
displayBooks(myLibrary);
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Add table
Reference in a new issue