diff --git a/webview/src/ConfigEditor/fields.tsx b/webview/src/ConfigEditor/fields.tsx index 67e32f6..2d1688f 100644 --- a/webview/src/ConfigEditor/fields.tsx +++ b/webview/src/ConfigEditor/fields.tsx @@ -120,8 +120,8 @@ export function sftpSudo(config: FileSystemConfig, onChange: FSCChanged<'sftpSud const callback = (newValue?: string) => onChange('sftpSudo', newValue === '' ? true : newValue); const description = 'Whether to use a sudo shell (and for which user) to run the sftpCommand in (if present, gets passed as -u to sudo)'; const values = ['']; - const value = (config.sftpSudo && typeof config.sftpSudo === 'string') ? config.sftpSudo : ''; - return + const value = config.sftpSudo === true ? '' : (typeof config.sftpSudo === 'string' ? config.sftpSudo : undefined); + return } export function terminalCommand(config: FileSystemConfig, onChange: FSCChanged<'terminalCommand'>): React.ReactElement {