2
0
mirror of https://github.com/frappe/books.git synced 2024-11-09 23:30:56 +00:00

fix: reading 'map' but found null error

This commit is contained in:
18alantom 2021-12-17 10:30:43 +05:30 committed by Alan
parent f502b8004b
commit e9192fa6ef

View File

@ -70,6 +70,7 @@ export default class PaymentServer extends BaseDocument {
}
validateReferenceAmount() {
if (!this.for?.length) return;
const referenceAmountTotal = this.for
.map(({ amount }) => amount)
.reduce((a, b) => a + b, 0);