Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 644e607

Browse files
Remove trailing colon when parsing the protocol from URL (#1778)
* Remove trailing colon when parsing the protocol from URL * Fix bug
1 parent 1d342cd commit 644e607

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎arduino-ide-extension/src/common/protocol/config-service.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ export namespace Network {
6060
try {
6161
// Patter: PROTOCOL://USER:PASS@HOSTNAME:PORT/
6262
const { protocol, hostname, password, username, port } = new URL(raw);
63+
// protocol in URL object contains a trailing colon
64+
const newProtocol = protocol.replace(/:$/, '');
6365
return {
64-
protocol,
66+
protocol: newProtocol,
6567
hostname,
6668
password,
6769
username,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /