undefined =/= ''

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-06-02 00:42:19 +01:00
parent f4db83a031
commit b1973d7998

View file

@ -958,7 +958,7 @@ module.exports = React.createClass({
const audioInputs = this.state.mediaDevices.audioinput.slice(0); const audioInputs = this.state.mediaDevices.audioinput.slice(0);
if (audioInputs.length > 0) { if (audioInputs.length > 0) {
let defaultInput; let defaultInput = '';
if (!audioInputs.some((input) => input.deviceId === 'default')) { if (!audioInputs.some((input) => input.deviceId === 'default')) {
audioInputs.unshift(defaultOption); audioInputs.unshift(defaultOption);
} else { } else {
@ -978,7 +978,7 @@ module.exports = React.createClass({
const videoInputs = this.state.mediaDevices.videoinput.slice(0); const videoInputs = this.state.mediaDevices.videoinput.slice(0);
if (videoInputs.length > 0) { if (videoInputs.length > 0) {
let defaultInput; let defaultInput = '';
if (!videoInputs.some((input) => input.deviceId === 'default')) { if (!videoInputs.some((input) => input.deviceId === 'default')) {
videoInputs.unshift(defaultOption); videoInputs.unshift(defaultOption);
} else { } else {