Skip to content

Commit

Permalink
fix: promise return of logout
Browse files Browse the repository at this point in the history
  • Loading branch information
seojinwoo committed Oct 4, 2022
1 parent 193154b commit 767dd7f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/iot-device-sdk/src/common.ts
Expand Up @@ -532,7 +532,14 @@ export class TuyaSdkBridge {
console.log(e, 'Login First!');
TuyaSdkBridge.debugLogEventFunctionPointer(debugCode.INF_NO_SESSION);
});
return returnValue;

return new Promise((resolve, reject) => {
if (returnValue) {
resolve(returnValue);
} else {
reject(returnValue);
}
});
}

// private static debugLogEventInternalFunction(log: any) {
Expand Down

0 comments on commit 767dd7f

Please sign in to comment.