File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2078,7 +2078,7 @@ async function connect() {
20782078
20792079 // Only set "Disconnected" status for normal disconnections
20802080 // Preserve error messages (app_down, capacity_full, error) instead of overwriting
2081- if ( state . disconnectReason === "normal" || state . disconnectReason == null ) {
2081+ if ( state . disconnectReason === "normal" || state . disconnectReason === null || state . disconnectReason === undefined ) {
20822082 setStatus ( "Disconnected" , STATUS_COLORS . error ) ;
20832083 } else {
20842084 debugLog ( `Preserving disconnect status for reason: ${ state . disconnectReason } ` ) ;
@@ -2125,7 +2125,7 @@ async function disconnect() {
21252125 connectBtn . disabled = true ;
21262126
21272127 // Set disconnectReason to "normal" if not already set (for user-initiated disconnects)
2128- if ( state . disconnectReason == null ) {
2128+ if ( state . disconnectReason === null || state . disconnectReason === undefined ) {
21292129 state . disconnectReason = "normal" ;
21302130 }
21312131
You can’t perform that action at this time.
0 commit comments