From 1b90de0249904532f8fe5b9f557752ef42648f23 Mon Sep 17 00:00:00 2001 From: devinleighsmith <41091511+devinleighsmith@users.noreply.github.com> Date: Tue, 21 Jan 2025 14:27:53 -0800 Subject: [PATCH] psp-9865 - fix map click loading logic. (#4607) --- source/backend/api/Pims.Api.csproj | 4 ++-- source/frontend/package.json | 2 +- .../components/common/mapFSM/useLocationFeatureLoader.tsx | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/backend/api/Pims.Api.csproj b/source/backend/api/Pims.Api.csproj index 418d59ea12..f09d8d6653 100644 --- a/source/backend/api/Pims.Api.csproj +++ b/source/backend/api/Pims.Api.csproj @@ -2,8 +2,8 @@ 0ef6255f-9ea0-49ec-8c65-c172304b4926 - 5.7.1-96.22 - 5.7.1.96 + 5.7.2-96.22 + 5.7.2.96 true {16BC0468-78F6-4C91-87DA-7403C919E646} net8.0 diff --git a/source/frontend/package.json b/source/frontend/package.json index 437c0108d0..4932d87988 100644 --- a/source/frontend/package.json +++ b/source/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "5.7.1-96.22", + "version": "5.7.2-96.22", "private": true, "dependencies": { "@bcgov/bc-sans": "1.0.1", diff --git a/source/frontend/src/components/common/mapFSM/useLocationFeatureLoader.tsx b/source/frontend/src/components/common/mapFSM/useLocationFeatureLoader.tsx index 57fdadfc32..6b399957fe 100644 --- a/source/frontend/src/components/common/mapFSM/useLocationFeatureLoader.tsx +++ b/source/frontend/src/components/common/mapFSM/useLocationFeatureLoader.tsx @@ -148,7 +148,10 @@ const useLocationFeatureLoader = () => { const boundaryFeature = await findOneByBoundary(latLng, 'GEOMETRY', 4326); if (exists(boundaryFeature)) { pimsLocationProperties = { features: [boundaryFeature], type: 'FeatureCollection' }; - } else if (exists(parcelFeature)) { + } else if ( + exists(parcelFeature) && + (exists(parcelFeature.properties?.PID) || exists(parcelFeature.properties?.PIN)) + ) { pimsLocationProperties = await loadProperties({ PID: parcelFeature.properties?.PID || '', PIN: parcelFeature.properties?.PIN?.toString() || '',