Collegamento: corretta la SyntaxError di connection.js anche su S4b
verifica / controlli (push) Successful in 22s
verifica / prove (push) Successful in 17m38s
verifica / installatore (push) Canceled after 0s
verifica / immagine (push) Canceled after 0s

Una «let saved» dichiarata due volte nello stesso blocco di savedSessionBox fermava tutta
la pagina Collegamento: nella CI di questo ramo cadevano 11 prove dell'interfaccia
(«Identifier 'saved' has already been declared»). La correzione era stata fatta solo in
cima alla catena (2068dd2); qui si porta la stessa, identica, insieme al controllo della
sintassi scritto in casa (ScriptSyntaxTests, ScriptCheck) che l'avrebbe colta, così i rami
seguenti la ricevono con un'unione pulita.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-25 20:05:00 +01:00
1 parent 2fc4b40c41
commit 4afdba0d35
3 files changed
+725 -5

No files matched your search

+5 -5
View File
@@ -328,7 +328,7 @@ export function savedSessionBox(saved, page) {
// Neither choice is shown as chosen, and neither can be picked, until the server says which one is stored: the page
// never claims a choice the next copy will not follow. Once Alberto picks one, a late answer no longer changes it;
// a choice the server did not save goes back to the one before.
let saved = null;
let stored = null;
let chosen = false;
const show = (value) => {
keep.input.checked = value === 'tieni-completa';
@@ -336,10 +336,10 @@ export function savedSessionBox(saved, page) {
};
const choose = async (value) => {
chosen = true;
const before = saved;
const before = stored;
try {
const settings = await api('/api/connection/settings', { method: 'PUT', body: { incompleteCopy: value } });
saved = settings && settings.incompleteCopy ? settings.incompleteCopy : value;
stored = settings && settings.incompleteCopy ? settings.incompleteCopy : value;
unknown.hidden = true;
toast(k('salvato'));
} catch (error) {
@@ -353,8 +353,8 @@ export function savedSessionBox(saved, page) {
for (const choice of [replace, keep]) choice.input.disabled = true;
api('/api/connection/settings', { signal: page && page.signal }).then((settings) => {
if (chosen) return;
saved = settings.incompleteCopy;
show(saved);
stored = settings.incompleteCopy;
show(stored);
}).catch(() => {
if (page && page.signal && page.signal.aborted) return; // the page was left
if (!chosen) unknown.hidden = false;