From 313bac2bbfc2fb1a477e7720793926dd73548eb7 Mon Sep 17 00:00:00 2001 From: dandds Date: Wed, 9 Jan 2019 12:40:57 -0500 Subject: [PATCH] handle empty strings when totalling clin value --- js/components/forms/funding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/forms/funding.js b/js/components/forms/funding.js index 64b2263b..73d7c077 100644 --- a/js/components/forms/funding.js +++ b/js/components/forms/funding.js @@ -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 )