From 98f6a0700c452150ed7fc13caa4f715e5dda8188 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Tue, 9 Jun 2026 11:03:04 +0000 Subject: [PATCH] Fix NovaCPX update action name mismatch and progress bar null error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - admin.js was calling 'apply-novacpx-update' but endpoint is 'apply-update' - Add null guard in nova.js progress bar setInterval — _barEl can be set to null by the fade-out timer between interval ticks, causing a crash Co-Authored-By: Claude Sonnet 4.6 --- panel/public/assets/js/admin.js | 2 +- panel/public/assets/js/nova.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/public/assets/js/admin.js b/panel/public/assets/js/admin.js index f340ebd..d23bc77 100644 --- a/panel/public/assets/js/admin.js +++ b/panel/public/assets/js/admin.js @@ -1943,7 +1943,7 @@ ${dbs.map(d=>` window.applyNovaCPXUpdate = async () => { Nova.confirm('Apply NovaCPX update? PHP syntax is checked first, and a backup is taken automatically. The panel will self-restore if anything breaks.', async () => { Nova.loading('Pulling NovaCPX update from GitHub…'); - const res = await Nova.api('system', 'apply-novacpx-update', { method: 'POST' }); + const res = await Nova.api('system', 'apply-update', { method: 'POST' }); Nova.loadingDone(); const d = res?.data; if (!res?.success) { diff --git a/panel/public/assets/js/nova.js b/panel/public/assets/js/nova.js index 61920b7..c3551bf 100644 --- a/panel/public/assets/js/nova.js +++ b/panel/public/assets/js/nova.js @@ -23,7 +23,7 @@ window.Nova = (() => { _barEl.style.width = _barPct + '%'; clearInterval(_barTimer); _barTimer = setInterval(() => { - if (_barPct < 85) { _barPct += (_barPct < 50 ? 8 : _barPct < 70 ? 4 : 1); _barEl.style.width = _barPct + '%'; } + if (_barEl && _barPct < 85) { _barPct += (_barPct < 50 ? 8 : _barPct < 70 ? 4 : 1); _barEl.style.width = _barPct + '%'; } }, 200); } function _barDone() {