[bugfix] Config Page: Device. Fix the dropdown label that was possibly undefined.
This commit is contained in:
@@ -39,6 +39,8 @@ export const DropdownMenu = (props) => {
|
||||
|
||||
const getSelectedText = () => {
|
||||
if (props.state !== "ok") return;
|
||||
if (props.list[props.selected_id] === undefined) return props.selected_id; // [Fix me]
|
||||
|
||||
return props.list[props.selected_id];
|
||||
};
|
||||
const list = (props.list === undefined) ? {} : props.list;
|
||||
|
||||
@@ -279,6 +279,7 @@ export const useReceiveRoutes = () => {
|
||||
"/set/data/selected_mic_device": updateSelectedMicDevice,
|
||||
|
||||
"/run/selected_mic_device": (payload) => {
|
||||
|
||||
updateSelectedMicHost(payload.host);
|
||||
updateSelectedMicDevice(payload.device);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user