Better id

This commit is contained in:
syuilo 2018-10-13 19:16:47 +09:00
parent 2b536a7443
commit 3aef5e6748
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
5 changed files with 7 additions and 7 deletions

View file

@ -446,7 +446,7 @@ export default class MiOS extends EventEmitter {
const viaStream = this.stream && this.store.state.device.apiViaStream && !forceFetch;
if (viaStream) {
const id = Math.random().toString();
const id = Math.random().toString().substr(2, 8);
this.stream.once(`api:${id}`, res => {
if (res == null || Object.keys(res).length == 0) {