RemoteNodeEdit: fix getAddress() and isValid() inconsistency

This commit is contained in:
xiphon 2021-04-22 20:59:43 +00:00
parent 02ae14fd6b
commit 1f904d4cff

View file

@ -73,13 +73,12 @@ GridLayout {
}
function getAddress() {
if (!isValid()) {
return "";
}
var addr = daemonAddr.text.trim();
var port = daemonPort.text.trim();
// validation
if(addr === "" || addr.length < 2) return "";
if(!Utils.isNumeric(port)) return "";
return addr + ":" + port;
}