mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix style issues and build source after #35525
Ran `cd actioncable && yarn build`. [ Kasper Timm Hansen & Ryan Castner ]
This commit is contained in:
parent
33800d2330
commit
5f7e01c84c
2 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue