From b7c6c13bde698479740d05007abf616c281f6e6f Mon Sep 17 00:00:00 2001 From: edmondlang Date: Sun, 1 Sep 2024 19:58:51 +0800 Subject: [PATCH] fix payment-and-billing vue console error --- .../paymentsBilling/elements/PaymentsBillingComponents.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/assets/vue/components/paymentsBilling/elements/PaymentsBillingComponents.vue b/resources/assets/vue/components/paymentsBilling/elements/PaymentsBillingComponents.vue index ca4c0608..7e9f5f5d 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/PaymentsBillingComponents.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/PaymentsBillingComponents.vue @@ -26,11 +26,11 @@

Payment Date

-
{{ item.payment_history?.[item.payment_history.length - 1]?.created_at || '-' }}
+
{{ item.payment_history && item.payment_history.length > 0 ? item.payment_history[item.payment_history.length - 1].created_at : '-' }}

Bill Number

-
{{ item.payment_history?.[item.payment_history.length-1]?.payment_reference || '-' }}
+
{{ item.payment_history && item.payment_history.length > 0 ? item.payment_history[item.payment_history.length - 1].payment_reference : '-' }}