Skip to content

Commit

Permalink
Plugin Marketplace: Remove Rating Number For 0 Ratings (#96370)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurorum authored Dec 6, 2024
1 parent 6143c15 commit 91b0c31
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ export const ReviewsModal = ( props: Props ) => {
<div className="marketplace-reviews-modal__summary">
<div className="marketplace-reviews-modal__stats">
<div className="marketplace-reviews-modal__ratings-average">
{ averageRating.toLocaleString( getLocaleSlug() ?? 'default', {
minimumFractionDigits: 1,
maximumFractionDigits: 1,
} ) }
{ numberOfReviews > 0 &&
averageRating.toLocaleString( getLocaleSlug() ?? 'default', {
minimumFractionDigits: 1,
maximumFractionDigits: 1,
} ) }
</div>
<div className="marketplace-reviews-modal__ratings">
<Rating rating={ normalizedRating } />
Expand Down

0 comments on commit 91b0c31

Please sign in to comment.