Browse Source

Temporary fix balance calculation when no counter value for date

master
meriadec 7 years ago
parent
commit
fe28e9dbfb
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 5
      src/helpers/balance.js

5
src/helpers/balance.js

@ -89,6 +89,11 @@ export function getBalanceHistoryForAccount({
balance = b / 10 ** unit.magnitude * counterVals[date]
}
if (isNaN(balance)) {
console.warn(`This should not happen. Cant calculate balance for ${date}`) // eslint-disable-line no-console
return { date, balance: 0 }
}
return { date, balance }
})
}

Loading…
Cancel
Save