From d316325d6d19de6db21c83e8827a5d7d4be3cf95 Mon Sep 17 00:00:00 2001 From: Lixian Zhou Date: Mon, 9 Mar 2026 16:26:48 -0400 Subject: [PATCH] fix --- client/src/components/trans-routes/RoutesDashboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/trans-routes/RoutesDashboard.js b/client/src/components/trans-routes/RoutesDashboard.js index 65ba72e..1751bc2 100644 --- a/client/src/components/trans-routes/RoutesDashboard.js +++ b/client/src/components/trans-routes/RoutesDashboard.js @@ -111,10 +111,10 @@ const RoutesDashboard = () => { // Match route addresses against stored structured addresses without state/zip sensitivity. const normalizeAddressForMismatchCheck = (address) => { return normalizeAddress(address) - // Normalize unit identifiers like "Apt C-1" / "Apt C 1" to "Apt C1". - .replace(/([a-z])\s+(\d+)/g, '$1$2') .replace(/\b\d{5}(?:\s*\d{4})?\b/g, ' ') .replace(/\b(maryland|md|virginia|va)\b/g, ' ') + // Normalize unit identifiers like "Apt C-1" / "Apt C 1" to "Apt C1". + .replace(/\b(apt|apartment|unit|suite|ste)\s+([a-z])\s+(\d+)\b/g, '$1 $2$3') .replace(/\s+/g, ' ') .trim(); };