Skip to content

Commit ea01aa1

Browse files
fix(web): keep computer use handlers compatible with React Compiler
1 parent 2b632a8 commit ea01aa1

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

‎apps/web/src/components/settings/CuaSetupDialog.tsx‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@ export function CuaSetupDialog({
7272
await onAllow(target);
7373
} catch {
7474
setError("Could not open System Settings. Try Allow again.");
75-
} finally {
76-
pending.current = false;
77-
setBusy(false);
7875
}
76+
pending.current = false;
77+
setBusy(false);
7978
};
8079
const finish = async () => {
8180
if (pending.current || !ready) return;
@@ -87,10 +86,9 @@ export function CuaSetupDialog({
8786
onClose();
8887
} catch (error) {
8988
setError(error instanceof Error ? error.message : "Could not save the setting. Try again.");
90-
} finally {
91-
pending.current = false;
92-
setBusy(false);
9389
}
90+
pending.current = false;
91+
setBusy(false);
9492
};
9593
return (
9694
<Dialog

‎apps/web/src/components/settings/IntegrationsSettings.tsx‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -979,13 +979,10 @@ function ComputerUseControls() {
979979

980980
const save = async (enableCua: boolean) => {
981981
setSaving(true);
982-
try {
983-
const result = await updateSettings({ enableCua });
984-
refresh();
985-
return result;
986-
} finally {
987-
setSaving(false);
988-
}
982+
const result = await updateSettings({ enableCua });
983+
refresh();
984+
setSaving(false);
985+
return result;
989986
};
990987

991988
return (

0 commit comments

Comments
 (0)