fix(desktop): avoid relaunching without installing updates (#23806)

This commit is contained in:
Brendan Allan
2026-04-24 13:27:36 +08:00
committed by GitHub
parent 3bfe6a1ef6
commit 2e156b8990
7 changed files with 34 additions and 19 deletions
+2 -3
View File
@@ -244,10 +244,9 @@ export const ErrorPage: Component<ErrorPageProps> = (props) => {
}
async function installUpdate() {
if (!platform.update || !platform.restart) return
if (!platform.updateAndRestart) return
await platform
.update()
.then(() => platform.restart!())
.updateAndRestart()
.then(() => setStore("actionError", undefined))
.catch((err) => {
setStore("actionError", formatError(err, language.t))