From 50401ddda27704c7dd5e64ae1002320d526ebdb1 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Wed, 20 Sep 2023 18:43:53 +0800 Subject: [PATCH] fix destructuring error --- .../OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx b/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx index adf8e1e4f..b44bfa989 100644 --- a/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx +++ b/src/components/pages/profile/[name]/tabs/OwnershipTab/sections/RolesSection/hooks/useRoleActions.tsx @@ -53,7 +53,7 @@ export const useRoleActions = ({ name, roles, details }: Props) => { const data = useMemo(() => { if (isLoading) return undefined const canSend = checkCanSend({ abilities: abilities.data, nameType: nameType.data }) - const { canSendError } = abilities.data + const canSendError = abilities.data?.canSendError const showSend = canSend || !!canSendError const showSendDNS = showSend && name && !name.endsWith('.eth') const showSendEth = showSend && name && name.endsWith('.eth')