Apply strictNullChecks
to src/components/views/context_menus/*
(#10367)
This commit is contained in:
parent
4c2b5df1f2
commit
7c2511a592
6 changed files with 32 additions and 29 deletions
|
@ -54,7 +54,7 @@ const DeviceContextMenuSection: React.FC<IDeviceContextMenuSectionProps> = ({ de
|
|||
|
||||
useEffect(() => {
|
||||
const getDevices = async (): Promise<void> => {
|
||||
return setDevices((await MediaDeviceHandler.getDevices())[deviceKind]);
|
||||
return setDevices((await MediaDeviceHandler.getDevices())?.[deviceKind] ?? []);
|
||||
};
|
||||
getDevices();
|
||||
}, [deviceKind]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue