Merge pull request #1763 from jitsi/dp_def_prop

fix(desktop_picker): Use defaultProps
pull/1768/head jitsi-meet_2233
Saúl Ibarra Corretgé 8 years ago committed by GitHub
commit bae609b296
  1. 17
      react/features/desktop-picker/components/DesktopPicker.js

@ -39,6 +39,15 @@ const VALID_TYPES = TAB_CONFIGURATIONS.map(c => c.type);
* @extends Component
*/
class DesktopPicker extends Component {
/**
* Default values for DesktopPicker component's properties.
*
* @static
*/
static defaultProps = {
options: {}
};
/**
* DesktopPicker component's property types.
*
@ -102,10 +111,10 @@ class DesktopPicker extends Component {
* @inheritdoc
*/
componentWillMount() {
const options = this.props.options || {};
const { desktopSharingSources } = this.props.options;
this._onSourceTypesConfigChanged(
options.desktopSharingSources);
desktopSharingSources);
this._updateSources();
this._startPolling();
}
@ -130,10 +139,10 @@ class DesktopPicker extends Component {
});
}
const options = this.props.options || {};
const { desktopSharingSources } = this.props.options;
this._onSourceTypesConfigChanged(
options.desktopSharingSources);
desktopSharingSources);
}
/**

Loading…
Cancel
Save