source/lib/VBListPanel.js
// Return zero for an invalid port number

Return zero for an invalid port number
Return zero for an invalid port number
function validPort(port) {
  let portReturn = parseInt(port, 10)
  if (!(!isNaN(portReturn) && portReturn > 0 && portReturn < 65536)) {
    ipcRenderer.send('error-dialog',
                     'Invalid Port\n\nGo to Settings > Ports ... to Set Ports')
    portReturn = 0
  }
  return portReturn
}
function validPort ( port ) { let portReturn = parseInt ( port , 10 ) if ( ! ( ! isNaN ( portReturn ) && portReturn > 0 && portReturn < 65536 ) ) { ipcRenderer . send ( 'error-dialog' , 'Invalid Port\n\nGo to Settings > Ports ... to Set Ports' ) portReturn = 0 } return portReturn }
Return zero for an invalid port number
Return zero for an invalid port number