Skip to content

Commit

Permalink
fix: show identify on map click
Browse files Browse the repository at this point in the history
closes #475
  • Loading branch information
steveoh committed Oct 2, 2024
1 parent a2a1912 commit 23e4dbf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ export default function App() {
const onClick = useCallback(
(event: __esri.ViewImmediateClickEvent) => {
mapView!.hitTest(event).then(({ results }) => {
if (!results.length) {
if (
((results?.length ?? 0) > 0 && (results[0] as __esri.GraphicHit).graphic.layer === null) ||
results.length === 0
) {
trayState.open();

placeGraphic(
Expand Down

0 comments on commit 23e4dbf

Please sign in to comment.