From 27fb9bc57562e61affca923aad294b795b66641b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 14 Apr 2018 06:18:18 +0900 Subject: [PATCH] Fix bug --- src/client/app/common/mios.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts index f4bb60fcd..41825c3b7 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);