summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-14 06:18:18 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-14 06:18:18 +0900
commitf0be021d851bfca0df4ab71dbbc56edf82134f50 (patch)
tree87f77a0d1985165fa6b73af554abc3f45bbb36ab
parentwait 3 sec (diff)
downloadsharkey-f0be021d851bfca0df4ab71dbbc56edf82134f50.tar.gz
sharkey-f0be021d851bfca0df4ab71dbbc56edf82134f50.tar.bz2
sharkey-f0be021d851bfca0df4ab71dbbc56edf82134f50.zip
Fix bug
-rw-r--r--src/client/app/common/mios.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts
index f4bb60fcdb..41825c3b74 100644
--- a/src/client/app/common/mios.ts
+++ b/src/client/app/common/mios.ts
@@ -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);