Skip to content

Commit 2e56edd

Browse files
committed
refactor: Update WebSocket connection initialization in terminal.blade.php
1 parent 8179a5c commit 2e56edd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

resources/views/livewire/project/shared/terminal.blade.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ function initializeWebSocket() {
6161
port: ":6002",
6262
path: '/terminal/ws'
6363
}
64+
if (!window.location.port) {
65+
connectionString.port = ''
66+
}
6467
if (predefined.host) {
6568
connectionString.host = predefined.host
6669
}
@@ -70,9 +73,7 @@ function initializeWebSocket() {
7073
if (predefined.protocol) {
7174
connectionString.protocol = predefined.protocol
7275
}
73-
if (!window.location.port) {
74-
connectionString.port = ''
75-
}
76+
7677
console.log(connectionString)
7778
const url =
7879
`${connectionString.protocol}://${connectionString.host}${connectionString.port}${connectionString.path}`

0 commit comments

Comments
 (0)