handle empty strings when totalling clin value

This commit is contained in:
dandds 2019-01-09 12:40:57 -05:00
parent c9fa8a4312
commit 313bac2bbf

View File

@ -40,7 +40,7 @@ export default {
totalBudget: function () { totalBudget: function () {
return [this.clin_01, this.clin_02, this.clin_03, this.clin_04].reduce( return [this.clin_01, this.clin_02, this.clin_03, this.clin_04].reduce(
function(acc, curr) { function(acc, curr) {
curr = curr === null ? 0 : parseInt(curr) curr = !curr ? 0 : parseInt(curr)
return acc + curr; return acc + curr;
}, 0 }, 0
) )