Skip to content
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

Revisit review summary #659

Merged
merged 2 commits into from
Feb 1, 2025
Merged

Revisit review summary #659

merged 2 commits into from
Feb 1, 2025

Conversation

wbazant
Copy link
Collaborator

@wbazant wbazant commented Jan 4, 2025

Closes #446

Screenshot from 2025-01-04 16-15-35

2: ripeReviews,
} = groupBy(rProp('fruiting'), reviews)
const getStarRating = (score) => {
if (!score) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails for score = 0. Should probably be score === null.

@ezwelty
Copy link
Collaborator

ezwelty commented Jan 27, 2025

@wbazant Great! Only bug I could find is for ratings = 0, they are treated in the same way as null.

https://fallingfruit.org/locations/3364
quality_rating: 0 | yield_rating: 0
image

@wbazant
Copy link
Collaborator Author

wbazant commented Feb 1, 2025

Thanks for spotting! We've used zero-based counting for stars, and I needed to change one spot to:

 const getStarRating = (score) => {
-  if (!score) {
+  if (score === null) {
     return null
   }

@wbazant wbazant merged commit 09d2f43 into falling-fruit:main Feb 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve review summary
2 participants