mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
RemoteNodeEdit: fix getAddress() and isValid() inconsistency
This commit is contained in:
parent
02ae14fd6b
commit
1f904d4cff
1 changed files with 4 additions and 5 deletions
|
@ -73,13 +73,12 @@ GridLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAddress() {
|
function getAddress() {
|
||||||
|
if (!isValid()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
var addr = daemonAddr.text.trim();
|
var addr = daemonAddr.text.trim();
|
||||||
var port = daemonPort.text.trim();
|
var port = daemonPort.text.trim();
|
||||||
|
|
||||||
// validation
|
|
||||||
if(addr === "" || addr.length < 2) return "";
|
|
||||||
if(!Utils.isNumeric(port)) return "";
|
|
||||||
|
|
||||||
return addr + ":" + port;
|
return addr + ":" + port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue