handle empty strings when totalling clin value
This commit is contained in:
dandds 2019-01-10 09:56:56 -05:00 committed by GitHub
commit 3ec1123a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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