mirror of
https://github.com/hotomoe/hotomoe
synced 2024-12-02 16:58:11 +09:00
Fix bug
This commit is contained in:
parent
7eac0bb1d6
commit
f0be021d85
@ -457,7 +457,9 @@ export default class MiOS extends EventEmitter {
|
|||||||
const id = Math.random().toString();
|
const id = Math.random().toString();
|
||||||
|
|
||||||
stream.once(`api-res:${id}`, res => {
|
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);
|
resolve(res.res);
|
||||||
} else {
|
} else {
|
||||||
reject(res.e);
|
reject(res.e);
|
||||||
|
Loading…
Reference in New Issue
Block a user