From ef5dad9048c3f15c308eb7db4ccfc0018f7ff05a Mon Sep 17 00:00:00 2001 From: Monami Sharma Date: Wed, 21 Jun 2017 17:27:04 -0500 Subject: [PATCH] fixes open-austin/budgetparty/#177 by restricting decimal places to 2 --- app/src/reducers/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/reducers/services.js b/app/src/reducers/services.js index f44b963..ded0410 100644 --- a/app/src/reducers/services.js +++ b/app/src/reducers/services.js @@ -33,7 +33,7 @@ function services(state = InitialState.services, action = {}) { return memo + num }, 0) - const delta = Math.round((sumOfDepartments - sumOfLastYearDepartments) / sumOfLastYearDepartments * 100) + const delta = Number(((sumOfDepartments - sumOfLastYearDepartments) / sumOfLastYearDepartments * 100).toFixed(2)) newServiceState.amount = sumOfDepartments newServiceState.percentChange = delta