From 1f904d4cffe72415da578c63ab72dc87c14ba7e3 Mon Sep 17 00:00:00 2001 From: xiphon Date: Thu, 22 Apr 2021 20:59:43 +0000 Subject: [PATCH] RemoteNodeEdit: fix getAddress() and isValid() inconsistency --- components/RemoteNodeEdit.qml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/components/RemoteNodeEdit.qml b/components/RemoteNodeEdit.qml index 75ee8139..7b4b4773 100644 --- a/components/RemoteNodeEdit.qml +++ b/components/RemoteNodeEdit.qml @@ -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; }