Commit 09e99f6add7eae5fb334bc6b8f02462f6800ef4a
1 parent
74663c7d56
Exists in
master
Verifikasi eksistensi detailSplitted pada getBillCount
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
index.js
... | ... | @@ -242,6 +242,8 @@ function calculateBaseBillAmount(detailSplitted, customKeywords, productKeyval, |
242 | 242 | * @returns {number} |
243 | 243 | */ |
244 | 244 | function getBillCount(detailSplitted, customKeyword) { |
245 | + if (!detailSplitted) return 0; | |
246 | + | |
245 | 247 | return Number( |
246 | 248 | (customKeyword && detailSplitted[customKeyword]) |
247 | 249 | || detailSplitted['JMLBLN'] |