openvidu-browser: fix removeFilter error when no filter available

pull/722/head
pabloFuente 2022-04-28 14:05:28 +02:00
parent 354a26c6d0
commit 8550b77d17
1 changed files with 42 additions and 32 deletions

View File

@ -540,7 +540,11 @@ export class Stream {
}
}
if (!!this.filter && this.filter?.type.startsWith('VB:')) {
if (!!this.filter) {
// There is a filter applied
if (this.filter?.type.startsWith('VB:')) {
// Client filters
@ -585,6 +589,12 @@ export class Stream {
}
);
}
} else {
// There is no filter applied
return reject(new OpenViduError(OpenViduErrorName.GENERIC_ERROR, "Stream " + this.streamId + " has no filter applied"));
}
});
}