Skip to content

Commit

Permalink
fix: Minus sign correction. (#18802)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhanttimeline authored Nov 27, 2024
1 parent 9f1be47 commit 15f56c1
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ public static String getFormattedPercentChangeMessage(Double percent) {
if (percent > 0) {
symbol = "+";
color = "#008611";
} else if (percent < 0) {
symbol = "-";
}

// No need for "-" since String.format handles negatives
return String.format(
"<span style=\"color:%s ; font-weight: 600\">%s%.2f%%</span>", color, symbol, percent);
}
Expand Down

0 comments on commit 15f56c1

Please sign in to comment.