From d1bca2838ffe201011b6fd64c64ce6fbc80f8148 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 19 Aug 2020 19:07:12 +0100 Subject: [PATCH] Add clarifying comment in media device selection Hopefully explain the confusing mismatch. --- .../views/settings/tabs/user/VoiceUserSettingsTab.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js index 4114f6bb22..a78cc10b92 100644 --- a/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/VoiceUserSettingsTab.js @@ -157,6 +157,9 @@ export default class VoiceUserSettingsTab extends React.Component { label: _t('Default Device'), }; const getDefaultDevice = (devices) => { + // Note we're looking for a device with deviceId 'default' but adding a device + // with deviceId == the empty string: this is because Chrome gives us a device + // with deviceId 'default', so we're looking for this, not the one we are adding. if (!devices.some((i) => i.deviceId === 'default')) { devices.unshift(defaultOption); return '';