Skip to content

Commit

Permalink
fixes open-austin/budgetparty/open-austin#177 by restricting decimal …
Browse files Browse the repository at this point in the history
…places to 2
  • Loading branch information
smonami committed Jun 21, 2017
1 parent 10e0c74 commit ef5dad9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/reducers/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef5dad9

Please sign in to comment.