chore: Fix codestyle to satisfy linter, and typo. (#22954)

This commit is contained in:
Bernd Oliver Sünderhauf 2023-10-28 13:42:39 +02:00 committed by GitHub
parent c4cabbb11a
commit d92f74f877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,11 +7,11 @@ function get_url(socket, path) {
}
let url = socket.request.headers.origin;
if (conf.developer_mode) {
let [protocal, host, port] = url.split(':');
let [protocol, host, port] = url.split(":");
if (port != conf.webserver_port) {
port = conf.webserver_port;
}
url = `${protocal}:${host}:${port}`;
url = `${protocol}:${host}:${port}`;
}
return url + path;
}