Skip to content

Commit

Permalink
Make sure http/https is set in nodeselector
Browse files Browse the repository at this point in the history
  • Loading branch information
n9lsjr committed Nov 6, 2024
1 parent 23b39ad commit 9ddefa3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/lib/components/NodeSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,16 @@
ssl: true,
};
} else {
const thisNode = nodeList.find((a) => a.url === input.split(':')[0] && a.port === parseInt(input.split(':')[1]));
if (!thisNode) {
window.api.errorMessage('Add http/https to your link');
$node.loading = false;
return;
}
nodeDetails = {
url: input.split(':')[0] ?? input,
port: parseInt(input.split(':')[1]) ?? '',
ssl: undefined,
url: thisNode.url,
port: parseInt(thisNode.port),
ssl: thisNode.ssl,
};
}
Expand Down

0 comments on commit 9ddefa3

Please sign in to comment.