Merge branch 'main' into library

This commit is contained in:
Smigz 2023-11-22 11:55:12 -05:00 committed by GitHub
commit 7237bcfd12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();