diff --git a/src/hooks/useSubnetGetCertificateById.tsx b/src/hooks/useSubnetGetCertificateById.tsx index d1dbdd3..706b10f 100644 --- a/src/hooks/useSubnetGetCertificateById.tsx +++ b/src/hooks/useSubnetGetCertificateById.tsx @@ -51,7 +51,8 @@ export default function useSubnetGetCertificateById({ if (data) { if ( !data?.certificate || - data.certificate.sourceSubnetId !== selectedSubnet?.id + (data.certificate.sourceSubnetId !== selectedSubnet?.id && + selectedSubnet) ) { setErrors((e) => [ ...e,