mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-19 19:06:16 +01:00
Make sure camera is always set in settings (#11812)
This commit is contained in:
parent
859682c8d1
commit
e1bedf30bf
@ -81,12 +81,10 @@ export default function Settings() {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (cameras.length) {
|
||||
if (cameras.length > 0 && selectedCamera === "") {
|
||||
setSelectedCamera(cameras[0].name);
|
||||
}
|
||||
// only run once
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
}, [cameras, selectedCamera]);
|
||||
|
||||
useEffect(() => {
|
||||
if (tabsRef.current) {
|
||||
|
Loading…
Reference in New Issue
Block a user