mirror of
https://github.com/frappe/books.git
synced 2024-11-13 00:46:28 +00:00
fix: reading 'map' but found null error
This commit is contained in:
parent
f502b8004b
commit
e9192fa6ef
@ -70,6 +70,7 @@ export default class PaymentServer extends BaseDocument {
|
|||||||
}
|
}
|
||||||
|
|
||||||
validateReferenceAmount() {
|
validateReferenceAmount() {
|
||||||
|
if (!this.for?.length) return;
|
||||||
const referenceAmountTotal = this.for
|
const referenceAmountTotal = this.for
|
||||||
.map(({ amount }) => amount)
|
.map(({ amount }) => amount)
|
||||||
.reduce((a, b) => a + b, 0);
|
.reduce((a, b) => a + b, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user