Skip to content

Commit dbfb88e

Browse files
fix(web): keep computer use handlers compatible with React Compiler
1 parent a300aa9 commit dbfb88e

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
@@ -1130,13 +1130,10 @@ function ComputerUseControls() {
11301130

11311131
const save = async (enableCua: boolean) => {
11321132
setSaving(true);
1133-
try {
1134-
const result = await updateSettings({ enableCua });
1135-
refresh();
1136-
return result;
1137-
} finally {
1138-
setSaving(false);
1139-
}
1133+
const result = await updateSettings({ enableCua });
1134+
refresh();
1135+
setSaving(false);
1136+
return result;
11401137
};
11411138

11421139
return (

0 commit comments

Comments
 (0)