diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-13 09:44:00 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-13 09:44:00 +0900 |
| commit | 22d2f2051c4cbe3da5b9ece674f36a6555f8c953 (patch) | |
| tree | 0c29ea7c8f1797f9a28cab2d70d31e91cd9cb312 /src/client/app/common | |
| parent | wip (diff) | |
| download | misskey-22d2f2051c4cbe3da5b9ece674f36a6555f8c953.tar.gz misskey-22d2f2051c4cbe3da5b9ece674f36a6555f8c953.tar.bz2 misskey-22d2f2051c4cbe3da5b9ece674f36a6555f8c953.zip | |
wip
Diffstat (limited to 'src/client/app/common')
| -rw-r--r-- | src/client/app/common/mios.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/app/common/mios.ts b/src/client/app/common/mios.ts index a09af799be..ccc73eebc3 100644 --- a/src/client/app/common/mios.ts +++ b/src/client/app/common/mios.ts @@ -444,9 +444,10 @@ export default class MiOS extends EventEmitter { // Append a credential if (this.isSignedIn) (data as any).i = this.i.token; - const viaStream = localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true; - return new Promise((resolve, reject) => { + const viaStream = this.stream.hasConnection && + (localStorage.getItem('apiViaStream') ? localStorage.getItem('apiViaStream') == 'true' : true); + if (viaStream) { const stream = this.stream.borrow(); const id = Math.random().toString(); |