Skip to content

Commit

Permalink
thierry feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuRA committed May 15, 2023
1 parent 8d5433f commit af50b68
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/xo-web/src/xo-app/proxies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ import { updateApplianceSettings } from './update-appliance-settings'
import Tooltip from '../../common/tooltip'
import { getXoaPlan, SOURCES } from '../../common/xoa-plans'

const _editProxy = (value, { name, proxy }) => editProxyAppliance(proxy, { [name]: value })

const _editProxyAddress = (value, props) => {
value = value.trim()
return _editProxy(value === '' ? null : value, props)
const _editProxy = (value, { name, proxy }) => {
if (typeof value === 'string') {
value = value.trim()
}
return editProxyAppliance(proxy, { [name]: value === '' ? null : value })
}

const HEADER = (
Expand Down Expand Up @@ -150,7 +150,7 @@ const COLUMNS = [
},
{
itemRenderer: proxy => (
<Text data-name='address' data-proxy={proxy} value={proxy.address ?? ''} onChange={_editProxyAddress} />
<Text data-name='address' data-proxy={proxy} value={proxy.address ?? ''} onChange={_editProxy} />
),
name: _('address'),
},
Expand Down

0 comments on commit af50b68

Please sign in to comment.