-
-
Notifications
You must be signed in to change notification settings - Fork 160
Glasgow | 25-ITP-Sept | Shreef Ibrahim | Sprint 2 | Book Library #366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Glasgow | 25-ITP-Sept | Shreef Ibrahim | Sprint 2 | Book Library #366
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The input validation can still use some improvement. Everything else looks good.
debugging/book-library/script.js
Outdated
| if (isNaN(Number(pages)) || Number(pages) <= 0) { | ||
| showError("Pages must be a positive number."); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you i have updated
|
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