diff --git a/app/src/components/AppSettings/AddManualIp/ManualIpForm.js b/app/src/components/AppSettings/AddManualIp/ManualIpForm.js index 6b46b0dbf42..9cc735d3541 100644 --- a/app/src/components/AppSettings/AddManualIp/ManualIpForm.js +++ b/app/src/components/AppSettings/AddManualIp/ManualIpForm.js @@ -31,7 +31,12 @@ class IpForm extends React.Component { { - this.props.addManualIp(values.ip) + // trim whitespace and carriage returns + const ip = values.ip.trim() + // guard against double submit on enter keypress + if (!ip) return + + this.props.addManualIp(ip) const $input = this.inputRef.current if ($input) $input.blur()