mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 15:03:08 +02:00
Fix bug
This commit is contained in:
parent
7eac0bb1d6
commit
f0be021d85
1 changed files with 3 additions and 1 deletions
|
@ -457,7 +457,9 @@ export default class MiOS extends EventEmitter {
|
|||
const id = Math.random().toString();
|
||||
|
||||
stream.once(`api-res:${id}`, res => {
|
||||
if (res.res) {
|
||||
if (res == null || Object.keys(res).length == 0) {
|
||||
resolve(null);
|
||||
} else if (res.res) {
|
||||
resolve(res.res);
|
||||
} else {
|
||||
reject(res.e);
|
||||
|
|
Loading…
Reference in a new issue