Skip to content

Commit

Permalink
fix(web): add data url to componentId for better tracking of componen…
Browse files Browse the repository at this point in the history
…t in core (#421)
  • Loading branch information
pyshx authored May 18, 2023
1 parent d1125e7 commit c3ab031
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web/src/core/engines/Cesium/Feature/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c3ab031

Please sign in to comment.