From 46453560f2c7cb6b10827942b793fb76dbc44474 Mon Sep 17 00:00:00 2001 From: b-saikrishnakanth <130811169+b-saikrishnakanth@users.noreply.github.com> Date: Mon, 22 Dec 2025 12:55:19 +0530 Subject: [PATCH] [WEB-5657] chore: synchronization configuration for multiple providers in authentication adapter #8409 --- .../core/components/common/controller-switch.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/admin/core/components/common/controller-switch.tsx b/apps/admin/core/components/common/controller-switch.tsx index 1712ca0ad..f20d6cafe 100644 --- a/apps/admin/core/components/common/controller-switch.tsx +++ b/apps/admin/core/components/common/controller-switch.tsx @@ -26,13 +26,11 @@ export function ControllerSwitch(props: Props) { } - render={({ field: { value, onChange } }) => ( - (parseInt(value) ? onChange("0") : onChange("1"))} - size="sm" - /> - )} + render={({ field: { value, onChange } }) => { + const parsedValue = Number.parseInt(typeof value === "string" ? value : String(value ?? "0"), 10); + const isOn = !Number.isNaN(parsedValue) && parsedValue !== 0; + return onChange(isOn ? "0" : "1")} size="sm" />; + }} />