mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 04:06:44 +02:00
Better null check
to make tests happy
This commit is contained in:
parent
a798772e80
commit
a77d675664
@ -118,7 +118,7 @@ function getRemoteAudioElement(): HTMLAudioElement {
|
||||
export default class CallHandler {
|
||||
private calls = new Map<string, MatrixCall>(); // roomId -> call
|
||||
private audioPromises = new Map<AudioID, Promise<void>>();
|
||||
private dispatcherRef: string;
|
||||
private dispatcherRef: string = null;
|
||||
|
||||
static sharedInstance() {
|
||||
if (!window.mxCallHandler) {
|
||||
@ -152,7 +152,7 @@ export default class CallHandler {
|
||||
if (cli) {
|
||||
cli.removeListener('Call.incoming', this.onCallIncoming);
|
||||
}
|
||||
if (this.dispatcherRef) dis.unregister(this.dispatcherRef);
|
||||
if (this.dispatcherRef !== null) dis.unregister(this.dispatcherRef);
|
||||
}
|
||||
|
||||
private onCallIncoming = (call) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user