set dispatcher ref to null so we don't double-unregister
This commit is contained in:
parent
a77d675664
commit
973a0b7b8a
1 changed files with 4 additions and 1 deletions
|
@ -152,7 +152,10 @@ export default class CallHandler {
|
||||||
if (cli) {
|
if (cli) {
|
||||||
cli.removeListener('Call.incoming', this.onCallIncoming);
|
cli.removeListener('Call.incoming', this.onCallIncoming);
|
||||||
}
|
}
|
||||||
if (this.dispatcherRef !== null) dis.unregister(this.dispatcherRef);
|
if (this.dispatcherRef !== null) {
|
||||||
|
dis.unregister(this.dispatcherRef);
|
||||||
|
this.dispatcherRef = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private onCallIncoming = (call) => {
|
private onCallIncoming = (call) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue