Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix default value of returnResult
Browse files Browse the repository at this point in the history
guoxianzhe committed Oct 16, 2023
1 parent cb7914b commit 4cda827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rtc/src/engine/IrisRtcEngine.ts
Original file line number Diff line number Diff line change
@@ -203,7 +203,7 @@ export class IrisRtcEngine implements ApiInterceptor {
code: number = NATIVE_RTC.ERROR_CODE_TYPE.ERR_OK,
data: string = '{"result": 0}'
): Promise<CallIrisApiResult> {
if (!isSuccess) {
if (!isSuccess && typeof code !== 'number') {
code = -NATIVE_RTC.ERROR_CODE_TYPE.ERR_FAILED;
}
return Promise.resolve(new CallIrisApiResult(code, data));

0 comments on commit 4cda827

Please sign in to comment.