mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-22 17:26:21 +03:00
Don't overwrite original variable
This commit is contained in:
parent
5cea69472f
commit
dad9157d84
1 changed files with 1 additions and 2 deletions
|
@ -116,8 +116,7 @@ function getHost(url) {
|
|||
|
||||
try {
|
||||
// hack: URL can not get hostname from udp protocol
|
||||
url = url.replace(/^udp:/, 'https:');
|
||||
const parsedUrl = new URL(url);
|
||||
const parsedUrl = new URL(url.replace(/^udp:/, 'https:'));
|
||||
// host: "example.com:8443"
|
||||
// hostname: "example.com"
|
||||
const host = parsedUrl.hostname;
|
||||
|
|
Loading…
Reference in a new issue