Skip to content

Commit 4843708

Browse files
committed
Fix author field when creating new Book from form input
1 parent 478a62d commit 4843708

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

debugging/book-library/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ function submit() {
3737
alert("Please fill all fields!");
3838
return false;
3939
} else {
40-
let book = new Book(title.value, title.value, pages.value, check.checked);
41-
library.push(book);
40+
let book = new Book(title.value, author.value, pages.value, check.checked);
41+
myLibrary.push(book);
4242
render();
4343
}
4444
}

0 commit comments

Comments
 (0)