From f52119a5400a317cf6ccfeb3778cb469e5291824 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Thu, 3 Feb 2022 15:14:05 -0300 Subject: [PATCH] Handle non-used addresses in search fix#67 --- src/address/AddressTransactionResults.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/address/AddressTransactionResults.tsx b/src/address/AddressTransactionResults.tsx index 8ca2118..cc8665e 100644 --- a/src/address/AddressTransactionResults.tsx +++ b/src/address/AddressTransactionResults.tsx @@ -132,8 +132,8 @@ const AddressTransactionResults: React.FC = ({ address={address} isFirst={controller?.isFirst} isLast={controller?.isLast} - prevHash={page ? page[0].hash : ""} - nextHash={page ? page[page.length - 1].hash : ""} + prevHash={page?.[0]?.hash ?? ""} + nextHash={page?.[page.length - 1]?.hash ?? ""} disabled={controller === undefined} /> @@ -165,8 +165,8 @@ const AddressTransactionResults: React.FC = ({ address={address} isFirst={controller?.isFirst} isLast={controller?.isLast} - prevHash={page ? page[0].hash : ""} - nextHash={page ? page[page.length - 1].hash : ""} + prevHash={page?.[0]?.hash ?? ""} + nextHash={page?.[page.length - 1]?.hash ?? ""} disabled={controller === undefined} />