Enhancement: support another ghostfolio breaking change
This commit is contained in:
parent
9243187490
commit
0bca24626e
@ -6,7 +6,9 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
function getPerformancePercent(t, performanceRange) {
|
||||
// ghostfolio v2.79.0 changed to grossPerformancePercentage
|
||||
// ghostfolio v2.106.0 changed to netPerformancePercentageWithCurrencyEffect
|
||||
const percent =
|
||||
performanceRange.performance.netPerformancePercentageWithCurrencyEffect ??
|
||||
performanceRange.performance.grossPerformancePercentage ??
|
||||
performanceRange.performance.currentGrossPerformancePercent;
|
||||
return `${percent > 0 ? "+" : ""}${t("common.percent", {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user