fix: Fixes visitors count when the data is missing.

This commit is contained in:
damencho 2023-02-24 11:16:58 -06:00 committed by Дамян Минков
parent e405595a11
commit f14b69166c
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ StateListenerRegistry.register(
conference.on(JitsiConferenceEvents.PROPERTIES_CHANGED, (properties: { 'visitor-count': number; }) => {
const visitorCount = Number(properties?.['visitor-count']);
if (getState()['features/visitors'].count !== visitorCount) {
if (!isNaN(visitorCount) && getState()['features/visitors'].count !== visitorCount) {
dispatch(updateVisitorsCount(visitorCount));
}
});