2
0
mirror of https://github.com/frappe/books.git synced 2025-01-22 14:48:25 +00:00

fix: empty list if tax.details undef

This commit is contained in:
18alantom 2022-08-23 16:47:30 +05:30
parent abcc96752e
commit 95f40d4c20

View File

@ -152,7 +152,7 @@ export abstract class Invoice extends Transactional {
}
const tax = await this.getTax(item.tax!);
for (const { account, rate } of tax.details as TaxDetail[]) {
for (const { account, rate } of (tax.details ?? []) as TaxDetail[]) {
taxes[account] ??= {
account,
rate,