Browse Source

Don't overwrite original variable

adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
dad9157d84
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 3
      src/webui/www/private/scripts/client.js

3
src/webui/www/private/scripts/client.js

@ -116,8 +116,7 @@ function getHost(url) { @@ -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…
Cancel
Save