From 39cd38eb2d20ff06382ae8993b945fcec4336a6d Mon Sep 17 00:00:00 2001 From: gxz Date: Wed, 3 Apr 2024 18:37:03 +0800 Subject: [PATCH] chore: optimize --- packages/rtc/src/impl/IAgoraRtcEngineImpl.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/rtc/src/impl/IAgoraRtcEngineImpl.ts b/packages/rtc/src/impl/IAgoraRtcEngineImpl.ts index 40eb8e6..2a1118d 100644 --- a/packages/rtc/src/impl/IAgoraRtcEngineImpl.ts +++ b/packages/rtc/src/impl/IAgoraRtcEngineImpl.ts @@ -73,7 +73,10 @@ export class IRtcEngineImpl implements IRtcEngineExtensions { AgoraTranslate.NATIVE_RTCAREA_CODE2AREAS(context.areaCode), ]); - if (context?.logConfig?.level) { + if ( + typeof context?.logConfig?.level === 'number' && + context?.logConfig?.level >= 0 + ) { this._engine.globalState.AgoraRTC.setLogLevel( AgoraTranslate.NATIVE_RTCLOG_LEVEL2Number(context?.logConfig?.level) );