Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
fix: plugin layersInViewport API returns errors for layers that have …
Browse files Browse the repository at this point in the history
…no location fields
  • Loading branch information
rot1024 committed Feb 15, 2022
1 parent f1dddae commit e52b44a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/molecules/Visualizer/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ function useProviderProps(
return layers.findAll(
layer =>
rect &&
layer.property &&
layer.property?.default?.location &&
typeof layer.property.default.location.lng === "number" &&
typeof layer.property.default.location.lat === "number" &&
Rectangle.contains(
new Rectangle(
CesiumMath.toRadians(rect.west),
Expand Down

0 comments on commit e52b44a

Please sign in to comment.