From 9853ac425a519900ee06bc3152e70526bc21e2fc Mon Sep 17 00:00:00 2001 From: Rostislav Dugin Date: Mon, 29 Dec 2025 15:47:00 +0300 Subject: [PATCH] FIX (sftp): Fix initial value in case of private key --- .../storages/ui/edit/storages/EditSFTPStorageComponent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx index f20df06..a9d20f2 100644 --- a/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx +++ b/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx @@ -14,7 +14,7 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr const hasAdvancedValues = !!storage?.sftpStorage?.skipHostKeyVerify; const [showAdvanced, setShowAdvanced] = useState(hasAdvancedValues); - const initialAuthMethod = storage?.sftpStorage?.privateKey !== undefined ? 'privateKey' : 'password'; + const initialAuthMethod = storage?.sftpStorage?.privateKey ? 'privateKey' : 'password'; const [authMethod, setAuthMethod] = useState<'password' | 'privateKey'>(initialAuthMethod); return (