fix: resolve variable redeclaration in Terminal.svelte
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 3m50s
Deploy Dashboard (Dev) / deploy-dev (push) Successful in 3m50s
Change 'const d' to 'let d' to allow reassignment in nested scopes
This commit is contained in:
@@ -267,7 +267,7 @@
|
||||
|
||||
async function connect(forceRefresh = false) {
|
||||
// Always refresh token before first connection to ensure fresh cookies
|
||||
const d = tabData.get(tabId);
|
||||
let d = tabData.get(tabId);
|
||||
const isFirstConnect = !d?.hasConnectedOnce;
|
||||
|
||||
if (forceRefresh || isFirstConnect) {
|
||||
@@ -343,7 +343,7 @@
|
||||
};
|
||||
ws.onclose = async (e) => {
|
||||
const reason = e.reason || `Connection closed (code ${e.code})`;
|
||||
const d = tabData.get(tabId);
|
||||
d = tabData.get(tabId);
|
||||
if (d) d.ws = null;
|
||||
|
||||
// Handle auth failures (code 1008)
|
||||
@@ -386,13 +386,13 @@
|
||||
}
|
||||
};
|
||||
ws.onerror = () => {
|
||||
const d = tabData.get(tabId);
|
||||
d = tabData.get(tabId);
|
||||
if (d) d.ws = null;
|
||||
if (!closedManually) scheduleReconnect("Connection failed");
|
||||
else updateTab(tabId, { connected: false, error: "Connection failed" });
|
||||
};
|
||||
|
||||
const d = tabData.get(tabId);
|
||||
d = tabData.get(tabId);
|
||||
if (d) {
|
||||
d.ws = ws;
|
||||
d.heartbeat = heartbeat;
|
||||
|
||||
Reference in New Issue
Block a user