diff --git a/packages/react-client/src/FishjamProvider.tsx b/packages/react-client/src/FishjamProvider.tsx index 12c837eb..a4120afa 100644 --- a/packages/react-client/src/FishjamProvider.tsx +++ b/packages/react-client/src/FishjamProvider.tsx @@ -78,7 +78,7 @@ export function FishjamProvider(props: FishjamProviderProps) { return { getLastDevice, saveLastDevice }; }, [props.persistLastDevice]); - const logger = getLogger(props.debug ?? false); + const logger = useMemo(() => getLogger(props.debug ?? false), [props.debug]); const { cameraManager, microphoneManager, initializeDevices } = useMediaDevices({ videoConstraints: props.constraints?.video ?? VIDEO_TRACK_CONSTRAINTS,