Refactor filter logic to exclude cameras with empty onvif host address

This commit is contained in:
Sergey Krashevich 2023-05-02 16:19:57 +03:00
parent b38c9e82e2
commit ae40db7720
No known key found for this signature in database
GPG Key ID: 625171324E7D3856

View File

@ -24,7 +24,7 @@ export default function Birdseye() {
}
return Object.entries(config.cameras)
.filter(([_, conf]) => conf.onvif?.host)
.filter(([_, conf]) => conf.onvif?.host && conf.onvif?.host !== '')
.map(([_, camera]) => camera.name);
}, [config]);