Skip to content

Commit

Permalink
fix: it should not render entity when coordinate is undefined on reea…
Browse files Browse the repository at this point in the history
…rth/core
  • Loading branch information
keiya01 committed Mar 2, 2023
1 parent 5a649fd commit 23b6c6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/engines/Cesium/Feature/Polygon/index.tsx
Expand Up @@ -70,7 +70,7 @@ export default function Polygon({ id, isVisible, property, geometry, layer, feat
[property?.near, property?.far],
);

return !isVisible ? null : (
return !isVisible || !coordiantes ? null : (
<EntityExt id={id} layerId={layer?.id} featureId={feature?.id} availability={availability}>
<PolygonGraphics
hierarchy={hierarchy}
Expand Down
2 changes: 1 addition & 1 deletion src/core/engines/Cesium/Feature/Polyline/index.tsx
Expand Up @@ -47,7 +47,7 @@ export default function Polyline({ id, isVisible, property, geometry, layer, fea
[property?.near, property?.far],
);

return !isVisible ? null : (
return !isVisible || !coordinates ? null : (
<EntityExt id={id} layerId={layer?.id} featureId={feature?.id} availability={availability}>
<PolylineGraphics
positions={positions}
Expand Down

0 comments on commit 23b6c6e

Please sign in to comment.