Await promise
This commit is contained in:
parent
af01cd0f5d
commit
a1a70e0548
@ -27,7 +27,7 @@ class MessageService {
|
|||||||
this.listener = setInterval(() => this._listener_tick(), this.listener_interval)
|
this.listener = setInterval(() => this._listener_tick(), this.listener_interval)
|
||||||
window.addEventListener('beforeunload', () => this.stop_listener())
|
window.addEventListener('beforeunload', () => this.stop_listener())
|
||||||
try {
|
try {
|
||||||
this._listener_tick()
|
await this._listener_tick()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.stop_listener()
|
this.stop_listener()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user