Skip to content

Commit

Permalink
water iq widget fix when best/worst months are the same
Browse files Browse the repository at this point in the history
  • Loading branch information
smanousopoulos committed Sep 27, 2017
1 parent f588af1 commit b9d572a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/utils/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ var waterIQ = function waterIQ(widget, intl) {
value: worst.user,
month: intl.formatDate(worst.timestamp, { month: 'long' })
}),
display: hasWaterIQ
display: hasWaterIQ && worst.user !== best.user
}, {
text: intl.formatMessage({ id: 'comparisons.wateriq-no-data' }),
display: !hasWaterIQ
Expand Down
2 changes: 1 addition & 1 deletion utils/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ const waterIQ = function (widget, intl) {
value: worst.user,
month: intl.formatDate(worst.timestamp, { month: 'long' }),
}),
display: hasWaterIQ,
display: hasWaterIQ && worst.user !== best.user,
},
{
text: intl.formatMessage({ id: 'comparisons.wateriq-no-data' }),
Expand Down

0 comments on commit b9d572a

Please sign in to comment.