From 4e34055f706b78d65d0506a3255b09f51c256849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carneiro?= Date: Thu, 20 Nov 2025 12:58:23 +0000 Subject: [PATCH] Narrow down check for tax object --- src/variables/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/variables/utils.ts b/src/variables/utils.ts index 061b94d..d4478d4 100644 --- a/src/variables/utils.ts +++ b/src/variables/utils.ts @@ -394,13 +394,13 @@ export const processTaxRecurrences = ( export const getTaxRate = ( source: any, - i18n: any, + i18n: I18n, index = 0, emptyTaxPlaceholder = i18n.t('table_order.no_tax', '(no tax)'), ) => { const tax = source.taxes?.[index]?.tax; - if (tax !== undefined) { + if (typeof tax === 'object' && tax !== null) { const rate = tax.rate; const description = tax.description;