From b3a94f2a4db55de905e1330ce5a6faa02ace925e Mon Sep 17 00:00:00 2001 From: ZhaiSoul <842607283@qq.com> Date: Thu, 23 Oct 2025 14:00:54 +0000 Subject: [PATCH] fix: Fixed a crash caused by potential null/empty zones in ObjectPath --- web/src/components/overlay/detail/ObjectPath.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/overlay/detail/ObjectPath.tsx b/web/src/components/overlay/detail/ObjectPath.tsx index a4a0b36c0..ba20dd93b 100644 --- a/web/src/components/overlay/detail/ObjectPath.tsx +++ b/web/src/components/overlay/detail/ObjectPath.tsx @@ -50,9 +50,9 @@ export function ObjectPath({ if (!imgRef.current || !positions) return []; const imgRect = imgRef.current.getBoundingClientRect(); 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.map((zone) => { + pos.lifecycle_item.data.zones.map((zone) => { return resolveZoneName(config, zone); }); }