From d873feba0535801b8a7345e4059bc18cd80b7bf4 Mon Sep 17 00:00:00 2001
From: Anxo Rodriguez <anxolin@gmail.com>
Date: Tue, 17 Dec 2024 15:01:20 +0000
Subject: [PATCH] chore: simplify

Co-authored-by: Leandro <alfetopito@users.noreply.github.com>
---
 .../src/components/orders/OrdersUserDetailsTable/index.tsx    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/explorer/src/components/orders/OrdersUserDetailsTable/index.tsx b/apps/explorer/src/components/orders/OrdersUserDetailsTable/index.tsx
index 7418b99cf2..935442b1c4 100644
--- a/apps/explorer/src/components/orders/OrdersUserDetailsTable/index.tsx
+++ b/apps/explorer/src/components/orders/OrdersUserDetailsTable/index.tsx
@@ -164,8 +164,8 @@ const OrdersUserDetailsTable: React.FC<Props> = (props) => {
   const [showCanceledAndExpired, setShowCanceledAndExpired] = useState(false)
   const [showPreSigning, setShowPreSigning] = useState(false)
 
-  const canceledAndExpiredCount = orders ? orders.filter(isExpiredOrCanceled).length : 0
-  const preSigningCount = orders ? orders.filter((order) => order.status === 'signing').length : 0
+  const canceledAndExpiredCount = orders?.filter(isExpiredOrCanceled).length || 0
+  const preSigningCount = orders?.filter((order) => order.status === 'signing').length || 0
   const showFilter = canceledAndExpiredCount > 0 || preSigningCount > 0
   const allOrdersAreHidden =
     orders?.length === (showPreSigning ? 0 : preSigningCount) + (showCanceledAndExpired ? 0 : canceledAndExpiredCount)