mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06:00
Don't overwrite original variable
This commit is contained in:
@@ -116,8 +116,7 @@ function getHost(url) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// hack: URL can not get hostname from udp protocol
|
// hack: URL can not get hostname from udp protocol
|
||||||
url = url.replace(/^udp:/, 'https:');
|
const parsedUrl = new URL(url.replace(/^udp:/, 'https:'));
|
||||||
const parsedUrl = new URL(url);
|
|
||||||
// host: "example.com:8443"
|
// host: "example.com:8443"
|
||||||
// hostname: "example.com"
|
// hostname: "example.com"
|
||||||
const host = parsedUrl.hostname;
|
const host = parsedUrl.hostname;
|
||||||
|
|||||||
Reference in New Issue
Block a user