refactor: disable old ota rebooting method in new version

This commit is contained in:
Adam Shiervani 2025-10-23 15:17:29 +00:00
parent 35d717610d
commit 0bd2821924
1 changed files with 7 additions and 0 deletions

View File

@ -677,6 +677,13 @@ export default function KvmIdRoute() {
return; return;
} }
// This is to prevent the otaState from handling page refreshes after an update
// We've recently implemented a new general rebooting flow, so we don't need to handle this specific ota-rebooting case
// However, with old devices, we wont get the `willReboot` message, so we need to keep this for backwards compatibility
// only for the cloud version with an old device
if (rebootState?.isRebooting) return;
const currentUrl = new URL(window.location.href); const currentUrl = new URL(window.location.href);
currentUrl.search = ""; currentUrl.search = "";
currentUrl.searchParams.set("updateSuccess", "true"); currentUrl.searchParams.set("updateSuccess", "true");