Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(ui): update Switch callback deps to prevent stale toggle handler for E2EE

Vishal Malyanc3e442f160e6
diff --git a/react/features/base/ui/components/web/Switch.tsx b/react/features/base/ui/components/web/Switch.tsx
index dd33c2839a..ce2062ab2b 100644
--- a/react/features/base/ui/components/web/Switch.tsx
+++ b/react/features/base/ui/components/web/Switch.tsx
@@ -116,7 +116,7 @@ const Switch = ({ className, id, checked, disabled, onChange }: IProps) => {
const change = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
onChange(e.target.checked);
- }, []);
+ }, [ onChange ]);
return (
<span