From a19c2a361ee9e788f733f4364c6b07ae4003c6c2 Mon Sep 17 00:00:00 2001 From: Sharon Gratch Date: Mon, 30 Dec 2024 20:00:08 +0200 Subject: [PATCH] Reading the cacert field value as undefined in case it's empty Reference: https://issues.redhat.com/browse/MTV-1653 Fix a bug in which in case of an empty/undefined cacert field value, read it as undefined and not as 'undefined' (the result of (string(undefined) expr) Signed-off-by: Sharon Gratch --- .../utils/components/CertificateUpload/CertificateUpload.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forklift-console-plugin/src/modules/Providers/utils/components/CertificateUpload/CertificateUpload.tsx b/packages/forklift-console-plugin/src/modules/Providers/utils/components/CertificateUpload/CertificateUpload.tsx index 98d03f9f0..7b78e84eb 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/utils/components/CertificateUpload/CertificateUpload.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/utils/components/CertificateUpload/CertificateUpload.tsx @@ -39,7 +39,7 @@ export const CertificateUpload: FC = ({ onTextChange(null, v)} - existingCert={String(value)} + existingCert={value ? String(value) : undefined} />, ); };