Skip to content

Commit 9d6ac64

Browse files
committed
fix(desktop): remove capability guard from update install button
The update banner's "restart & install" button silently did nothing because the renderer-side install() checked applyMode before calling IPC. If the capability was fetched before updateManager initialized, applyMode was "none" and the guard blocked the call permanently. Remove the redundant guard — the main process IPC handler already has its own null check on updateManager. The button is only visible when the update is in "ready" state, so the install action is always valid at that point.
1 parent 02e7354 commit 9d6ac64

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

apps/desktop/src/hooks/use-auto-update.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,6 @@ export function useAutoUpdate(options?: {
375375
}, [state.capability]);
376376

377377
const install = useCallback(async () => {
378-
if (
379-
state.capability?.applyMode !== "in-app" &&
380-
state.capability?.applyMode !== "external-installer"
381-
) {
382-
return;
383-
}
384-
385378
let previousPhase: Exclude<UpdatePhase, "installing"> = "ready";
386379

387380
setState((prev) => {
@@ -394,7 +387,7 @@ export function useAutoUpdate(options?: {
394387
} catch {
395388
// Errors are delivered via the update:error event
396389
}
397-
}, [state.capability]);
390+
}, []);
398391

399392
const dismiss = useCallback(() => {
400393
setState((prev) => ({

0 commit comments

Comments
 (0)