[FIX] App making calls to DDP after socket was killed by OS (#3062)

Co-authored-by: Gerzon Z <gerzonc@icloud.com>
This commit is contained in:
Diego Mello 2021-05-06 11:06:52 -03:00 committed by GitHub
parent fc52286bfa
commit 8f571fd029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1140,7 +1140,7 @@ const RocketChat = {
methodCall(...args) {
return new Promise(async(resolve, reject) => {
try {
const result = await this.sdk.methodCall(...args, this.code || '');
const result = await this.sdk?.methodCall(...args, this.code || '');
return resolve(result);
} catch (e) {
if (e.error && (e.error === 'totp-required' || e.error === 'totp-invalid')) {