diff --git a/frontend/js/phys9_legacy.js b/frontend/js/phys9_legacy.js index c5449a6..7e3dfdd 100644 --- a/frontend/js/phys9_legacy.js +++ b/frontend/js/phys9_legacy.js @@ -2737,7 +2737,9 @@ function renderTask(sec) { const s = STATE[sec]; const area = document.getElementById('taskArea' + sec); const fb = document.getElementById('fb' + sec); - document.getElementById('sum' + sec).classList.remove('show'); + const sum = document.getElementById('sum' + sec); + if (!area || !fb || !sum || !pool || !s) return; // секция отсутствует на этой странице + sum.classList.remove('show'); const q = pool[s.idx]; const done = s.results[s.idx] !== null; @@ -5836,9 +5838,11 @@ if (refToggle && refPanel) { // ══════════════════════════════════════════════ // ИНИЦИАЛИЗАЦИЯ // ══════════════════════════════════════════════ -['p1','p2','p3','p4','p5','p6','p7','p8','p9','p10','p11','p12','p13','p14','p15','p16','p17','p18','p19','p20','p21','p22','p23','p24','p25','p26','p27','p28','p29','p30','p31','p32','p33','p34','p35','p36','hard'].forEach(sec => renderTask(sec)); -setParaTab('p1'); -upd2(); upd3(); upd4(); upd5(); upd6(); upd7(); upd8(); upd10(); upd11(); upd12(); +try { + ['p1','p2','p3','p4','p5','p6','p7','p8','p9','p10','p11','p12','p13','p14','p15','p16','p17','p18','p19','p20','p21','p22','p23','p24','p25','p26','p27','p28','p29','p30','p31','p32','p33','p34','p35','p36','hard'].forEach(sec => { try { renderTask(sec); } catch(e){} }); +} catch(e) {} +try { setParaTab('p1'); } catch(e) {} +[upd2,upd3,upd4,upd5,upd6,upd7,upd8,upd10,upd11,upd12].forEach(fn => { try { fn(); } catch(e){} }); try { upd16(); upd17(); upd19(); upd20(); upd21();