We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7ca85e commit 9333f86Copy full SHA for 9333f86
actioncable/app/javascript/action_cable/index.js
@@ -30,12 +30,8 @@ export function getConfig(name) {
30
}
31
32
export function createWebSocketURL(url) {
33
- let webSocketURL
34
- if (typeof url === 'function') {
35
- webSocketURL = url()
36
- } else {
37
- webSocketURL = url
38
- }
+ const webSocketURL = typeof url === 'function' ? url() : url;
+
39
if (webSocketURL && !/^wss?:/i.test(webSocketURL)) {
40
const a = document.createElement("a")
41
a.href = webSocketURL
0 commit comments