Fix style issues and build source after #35525

Ran `cd actioncable && yarn build`.

[ Kasper Timm Hansen & Ryan Castner ]
This commit is contained in:
Kasper Timm Hansen 2019-03-11 14:32:43 +01:00
parent 33800d2330
commit 5f7e01c84c
No known key found for this signature in database
GPG Key ID: 191153215EDA53D8
2 changed files with 5 additions and 4 deletions

View File

@ -465,14 +465,15 @@
}
}
function createWebSocketURL(url) {
if (url && !/^wss?:/i.test(url)) {
var webSocketURL = typeof url === "function" ? url() : url;
if (webSocketURL && !/^wss?:/i.test(webSocketURL)) {
var a = document.createElement("a");
a.href = url;
a.href = webSocketURL;
a.href = a.href;
a.protocol = a.protocol.replace("http", "ws");
return a.href;
} else {
return url;
return webSocketURL;
}
}
exports.Connection = Connection;

View File

@ -30,7 +30,7 @@ export function getConfig(name) {
}
export function createWebSocketURL(url) {
const webSocketURL = typeof url === 'function' ? url() : url;
const webSocketURL = typeof url === "function" ? url() : url
if (webSocketURL && !/^wss?:/i.test(webSocketURL)) {
const a = document.createElement("a")