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(ShareDesktopButton): getParticipants reference

Hristo Terezove91df47d1be8
diff --git a/react/features/toolbox/components/web/ShareDesktopButton.js b/react/features/toolbox/components/web/ShareDesktopButton.js
index 78dc4335cb..cdb948cc50 100644
--- a/react/features/toolbox/components/web/ShareDesktopButton.js
+++ b/react/features/toolbox/components/web/ShareDesktopButton.js
@@ -3,7 +3,6 @@
import { translate } from '../../../base/i18n';
import { IconShareDesktop } from '../../../base/icons';
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
-import { getParticipants } from '../../../base/participants';
import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { getLocalVideoTrack } from '../../../base/tracks';
@@ -123,9 +122,7 @@ const mapStateToProps = state => {
if (enableFeaturesBasedOnToken) {
// we enable desktop sharing if any participant already have this
// feature enabled
- desktopSharingEnabled = getParticipants(state)
- .find(({ features = {} }) =>
- String(features['screen-sharing']) === 'true') !== undefined;
+ desktopSharingEnabled = state['features/base/participant'].haveParticipantWithScreenSharingFeature;
desktopSharingDisabledTooltipKey = 'dialog.shareYourScreenDisabled';
}