diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 389f08fd3b..7300d82541 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -958,7 +958,7 @@ module.exports = React.createClass({ const audioInputs = this.state.mediaDevices.audioinput.slice(0); if (audioInputs.length > 0) { - let defaultInput; + let defaultInput = ''; if (!audioInputs.some((input) => input.deviceId === 'default')) { audioInputs.unshift(defaultOption); } else { @@ -978,7 +978,7 @@ module.exports = React.createClass({ const videoInputs = this.state.mediaDevices.videoinput.slice(0); if (videoInputs.length > 0) { - let defaultInput; + let defaultInput = ''; if (!videoInputs.some((input) => input.deviceId === 'default')) { videoInputs.unshift(defaultOption); } else {