mirror of
https://github.com/plantroon/mx-puppet-xmpp.git
synced 2024-12-22 22:51:42 +00:00
fix undefined bug
This commit is contained in:
parent
df18162f39
commit
7a4cc6b3bf
@ -145,7 +145,9 @@ export class Client extends EventEmitter {
|
||||
}
|
||||
|
||||
public async disconnect() {
|
||||
await this.api.stopListening();
|
||||
if (this.api) {
|
||||
await this.api.stopListening();
|
||||
}
|
||||
if (this.contactsInterval) {
|
||||
clearInterval(this.contactsInterval);
|
||||
this.contactsInterval = null;
|
||||
|
Loading…
Reference in New Issue
Block a user