From adbb55623e84d48510f1743f7b7f2b31717c4f91 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 7 Jun 2025 08:08:08 +0200 Subject: [PATCH] Refactoring --- libs/common/src/lib/calculation-helper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/common/src/lib/calculation-helper.ts b/libs/common/src/lib/calculation-helper.ts index 76ae3eae6..d67384a30 100644 --- a/libs/common/src/lib/calculation-helper.ts +++ b/libs/common/src/lib/calculation-helper.ts @@ -28,7 +28,9 @@ export function getAnnualizedPerformancePercent({ exponent ); - return !isNaN(growthFactor) ? new Big(growthFactor).minus(1) : new Big(0); + if (!isNaN(growthFactor)) { + return new Big(growthFactor).minus(1); + } } return new Big(0);