fix audio input selector

This commit is contained in:
Chad Pilkey 2019-07-06 22:04:05 +00:00
parent d01c673825
commit c71de81b03

View File

@ -68,7 +68,8 @@ class DeviceSelector extends Component {
handleSelectChange(event) {
const { value } = event.target;
const { onChange, devices } = this.props;
const { onChange } = this.props;
const { devices } = this.state;
this.setState({ value }, () => {
const selectedDevice = devices.find(d => d.deviceId === value);
onChange(selectedDevice.deviceId, selectedDevice, event);
@ -101,7 +102,7 @@ class DeviceSelector extends Component {
</option>
))
: (
(kind == 'audiooutput' && browser().name == 'safari')
(kind === 'audiooutput' && browser().name === 'safari')
? <option value="not-found">Default</option>
: <option value="not-found">{`no ${kind} found`}</option>
)