Glasgow | 25-ITP-Sept | Shreef Ibrahim | Sprint 2 | Book Library #366
Glasgow | 25-ITP-Sept | Shreef Ibrahim | Sprint 2 | Book Library #366shreefAhmedM wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
-
Can you check if any of this general feedback can help you further improve your code?
https://github.com/cjyuan/Module-Data-Flows/blob/book-library-feedback/debugging/book-library/feedback.md -
Can you also improved the indentation in
script.js?
Doing so can help me speed up the review process. Thanks.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
i have updated the code |
cjyuan
left a comment
There was a problem hiding this comment.
The input validation can still use some improvement. Everything else looks good.
| if (isNaN(Number(pages)) || Number(pages) <= 0) { | ||
| showError("Pages must be a positive number."); | ||
| return; | ||
| } |
There was a problem hiding this comment.
-
Why not stored the converted number to a variable first to avoid unnecessary conversions?
-
Some invalid "number of pages" can still pass this check. Can you strengthen the check?
|
Looks good! |
Learners, PR Template
Self checklist
Changelist
PR: Fix bugs and improve adding books
What was done:
Fixed errors that stopped books from showing on page load
Fixed issues when adding a new book
Corrected author and read status values