Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Apr 3, 2024
1 parent b86849c commit 39cd38e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/rtc/src/impl/IAgoraRtcEngineImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' &&

Check warning on line 77 in packages/rtc/src/impl/IAgoraRtcEngineImpl.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
context?.logConfig?.level >= 0

Check warning on line 78 in packages/rtc/src/impl/IAgoraRtcEngineImpl.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 78 in packages/rtc/src/impl/IAgoraRtcEngineImpl.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
) {
this._engine.globalState.AgoraRTC.setLogLevel(
AgoraTranslate.NATIVE_RTCLOG_LEVEL2Number(context?.logConfig?.level)
);
Expand Down

0 comments on commit 39cd38e

Please sign in to comment.