File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
frontend/src/lib/k8s/api/v2 Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -76,18 +76,15 @@ export const WebSocketManager = {
7676 */
7777 async connect ( ) : Promise < WebSocket > {
7878 // Return existing connection if available
79- if ( typeof WebSocket !== 'undefined' && this . socketMultiplexer ?. readyState === WebSocket . OPEN ) {
79+ if ( this . socketMultiplexer ?. readyState === WebSocket . OPEN ) {
8080 return this . socketMultiplexer ;
8181 }
8282
8383 // Wait for existing connection attempt if in progress
8484 if ( this . connecting ) {
8585 return new Promise ( resolve => {
8686 const checkConnection = setInterval ( ( ) => {
87- if (
88- typeof WebSocket !== 'undefined' &&
89- this . socketMultiplexer ?. readyState === WebSocket . OPEN
90- ) {
87+ if ( this . socketMultiplexer ?. readyState === WebSocket . OPEN ) {
9188 clearInterval ( checkConnection ) ;
9289 resolve ( this . socketMultiplexer ) ;
9390 }
@@ -237,10 +234,7 @@ export const WebSocketManager = {
237234 this . activeSubscriptions . delete ( key ) ;
238235 this . completedPaths . delete ( key ) ;
239236
240- if (
241- typeof WebSocket !== 'undefined' &&
242- this . socketMultiplexer ?. readyState === WebSocket . OPEN
243- ) {
237+ if ( this . socketMultiplexer ?. readyState === WebSocket . OPEN ) {
244238 const userId = getUserIdFromLocalStorage ( ) ;
245239 const closeMsg : WebSocketMessage = {
246240 clusterId,
You can’t perform that action at this time.
0 commit comments