Better null check
to make tests happy
This commit is contained in:
parent
a798772e80
commit
a77d675664
1 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ function getRemoteAudioElement(): HTMLAudioElement {
|
||||||
export default class CallHandler {
|
export default class CallHandler {
|
||||||
private calls = new Map<string, MatrixCall>(); // roomId -> call
|
private calls = new Map<string, MatrixCall>(); // roomId -> call
|
||||||
private audioPromises = new Map<AudioID, Promise<void>>();
|
private audioPromises = new Map<AudioID, Promise<void>>();
|
||||||
private dispatcherRef: string;
|
private dispatcherRef: string = null;
|
||||||
|
|
||||||
static sharedInstance() {
|
static sharedInstance() {
|
||||||
if (!window.mxCallHandler) {
|
if (!window.mxCallHandler) {
|
||||||
|
@ -152,7 +152,7 @@ export default class CallHandler {
|
||||||
if (cli) {
|
if (cli) {
|
||||||
cli.removeListener('Call.incoming', this.onCallIncoming);
|
cli.removeListener('Call.incoming', this.onCallIncoming);
|
||||||
}
|
}
|
||||||
if (this.dispatcherRef) dis.unregister(this.dispatcherRef);
|
if (this.dispatcherRef !== null) dis.unregister(this.dispatcherRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onCallIncoming = (call) => {
|
private onCallIncoming = (call) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue