Fix faulty truthiness check for cart quantity - #2855
Merged
Conversation
If the quantity is 0, 0 shown on the screen, while ideally nothing should be shown.
blittle
reviewed
Apr 11, 2025
Co-authored-by: Bret Little <bret.little@gmail.com>
juanpprieto
previously approved these changes
Apr 11, 2025
Contributor
|
Please add a |
Contributor
Author
|
@juanpprieto Let me know if you need more details, otherwise it should be ready! |
blittle
approved these changes
Apr 11, 2025
Merged
juanpprieto
pushed a commit
that referenced
this pull request
Sep 17, 2025
* Fix faulty truthiness check for cart quantity If the quantity is 0, 0 shown on the screen, while ideally nothing should be shown. * Null to false Co-authored-by: Bret Little <bret.little@gmail.com> * Add changesets --------- Co-authored-by: Bret Little <bret.little@gmail.com>
frandiox
pushed a commit
that referenced
this pull request
Jun 16, 2026
* Fix faulty truthiness check for cart quantity If the quantity is 0, 0 shown on the screen, while ideally nothing should be shown. * Null to false Co-authored-by: Bret Little <bret.little@gmail.com> * Add changesets --------- Co-authored-by: Bret Little <bret.little@gmail.com>
marcospassos
pushed a commit
to croct-tech/croct-hydrogen-project
that referenced
this pull request
Jul 16, 2026
* Fix faulty truthiness check for cart quantity If the quantity is 0, 0 shown on the screen, while ideally nothing should be shown. * Null to false Co-authored-by: Bret Little <bret.little@gmail.com> * Add changesets --------- Co-authored-by: Bret Little <bret.little@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
When cart is empty, there's a rogue zero shown, while it should be empty instead.
WHAT is this pull request doing?
Fixes the faulty truthiness check, if the quantity is zero, React just shows it, but it shouldn't show anything actually, so a ternary with a false is used instead.
HOW to test your changes?
Post-merge steps
Checklist