From c3ab03149d3d90b00eb16dc0e5396c5ca82c6646 Mon Sep 17 00:00:00 2001 From: Piyush Chauhan <42397980+pyshx@users.noreply.github.com> Date: Thu, 18 May 2023 11:27:08 +0530 Subject: [PATCH] fix(web): add data url to componentId for better tracking of component in core (#421) --- web/src/core/engines/Cesium/Feature/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/core/engines/Cesium/Feature/index.tsx b/web/src/core/engines/Cesium/Feature/index.tsx index cb184d0e5a..1d2806f2c0 100644 --- a/web/src/core/engines/Cesium/Feature/index.tsx +++ b/web/src/core/engines/Cesium/Feature/index.tsx @@ -95,9 +95,11 @@ export default function Feature({ k: keyof AppearanceTypes, f?: ComputedFeature, ): JSX.Element | null => { - const componentId = `${layer.id}_${f?.id ?? ""}_${k}_${isHidden}_${ - JSON.stringify(f?.[k]) ?? "" - }`; + const componentId = generateIDWithMD5( + `${layer.id}_${f?.id ?? ""}_${k}_${isHidden}_${data?.url ?? ""}_${ + JSON.stringify(f?.[k]) ?? "" + }`, + ); const cachedComponent = CACHED_COMPONENTS.get(componentId); if (cachedComponent) {