mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-17 02:26:43 +03:00
fix: Fixed a crash caused by potential null/empty zones in ObjectPath
This commit is contained in:
parent
17e89da6ca
commit
b3a94f2a4d
@ -50,9 +50,9 @@ export function ObjectPath({
|
|||||||
if (!imgRef.current || !positions) return [];
|
if (!imgRef.current || !positions) return [];
|
||||||
const imgRect = imgRef.current.getBoundingClientRect();
|
const imgRect = imgRef.current.getBoundingClientRect();
|
||||||
return positions.map((pos) => {
|
return positions.map((pos) => {
|
||||||
if (config && pos.lifecycle_item) {
|
if (config && pos.lifecycle_item?.data?.zones) {
|
||||||
pos.lifecycle_item.data.zones_friendly_names =
|
pos.lifecycle_item.data.zones_friendly_names =
|
||||||
pos.lifecycle_item?.data.zones.map((zone) => {
|
pos.lifecycle_item.data.zones.map((zone) => {
|
||||||
return resolveZoneName(config, zone);
|
return resolveZoneName(config, zone);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user