Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(speaker-stats): dispatch action only on change

Hristo Terezovb033d0268a62
diff --git a/react/features/speaker-stats/middleware.ts b/react/features/speaker-stats/middleware.ts
index c8a7dafef5..b2207091c6 100644
--- a/react/features/speaker-stats/middleware.ts
+++ b/react/features/speaker-stats/middleware.ts
@@ -73,8 +73,11 @@ MiddlewareRegistry.register(({ dispatch, getState }: IStore) => (next: Function)
case PARTICIPANT_LEFT:
case PARTICIPANT_KICKED:
case PARTICIPANT_UPDATED: {
- dispatch(initReorderStats());
+ const { pendingReorder } = getState()['features/speaker-stats'];
+ if (!pendingReorder) {
+ dispatch(initReorderStats());
+ }
break;
}