From 765cb30978519aa21ecf97ff1b7276d40dab79d4 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Fri, 22 Mar 2024 10:35:21 -0400 Subject: [PATCH] UI fixes for when verifiers is empty Signed-off-by: Nicko Guyer --- ui/src/components/Forms/Tokens/TransferForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/components/Forms/Tokens/TransferForm.tsx b/ui/src/components/Forms/Tokens/TransferForm.tsx index d0ae619..1a4cfb9 100644 --- a/ui/src/components/Forms/Tokens/TransferForm.tsx +++ b/ui/src/components/Forms/Tokens/TransferForm.tsx @@ -91,7 +91,7 @@ export const TransferForm: React.FC = () => { if (isMounted) { const verifiers = verifiersRes; setTokenVerifiers(verifiers); - if (verifiers.length > 0) { + if (verifiers?.length > 0) { setRecipient(verifiers[0].value); } } @@ -189,7 +189,7 @@ export const TransferForm: React.FC = () => { identity.did)} + options={tokenVerifiers?.map((identity) => identity.did) || []} renderInput={(params) => ( )}