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
commit 2e156b8990
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 34 additions and 19 deletions

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))