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 title = document.querySelector('#title').value;
const readBtn = document.querySelector('#read-button').checked; const readBtn = document.querySelector('#read-button').checked;
if (author === "" || title === "") { if (author === "" || title === "") {
return return
} }
// create book object
const newBook = new Book(title, author, readBtn); const newBook = new Book(title, author, readBtn);
addBookToLibrary(newBook); addBookToLibrary(newBook);
displayBooks(myLibrary); displayBooks(myLibrary);
event.preventDefault(); event.preventDefault();