From 55ab0ae7fc8083393972dec6a8883ea254323724 Mon Sep 17 00:00:00 2001 From: Lixian Zhou Date: Tue, 10 Mar 2026 16:49:55 -0400 Subject: [PATCH] fix --- client/src/components/trans-routes/RoutesDashboard.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/src/components/trans-routes/RoutesDashboard.js b/client/src/components/trans-routes/RoutesDashboard.js index 1c4e64b..65ff36c 100644 --- a/client/src/components/trans-routes/RoutesDashboard.js +++ b/client/src/components/trans-routes/RoutesDashboard.js @@ -470,8 +470,13 @@ const RoutesDashboard = () => { const customerProfile = customerProfileById.get(customerId); if (!customerProfile) return; - const routeNote = `${customerInRoute?.customer_note || ''}`.trim(); - const dbNoteToDriver = `${customerProfile?.notes_for_driver || ''}`.trim(); + const normalizeNullableNote = (value) => { + const normalized = `${value || ''}`.trim().toLowerCase(); + if (normalized === 'null') return ''; + return `${value || ''}`.trim(); + }; + const routeNote = normalizeNullableNote(customerInRoute?.customer_note); + const dbNoteToDriver = normalizeNullableNote(customerProfile?.notes_for_driver); if (routeNote === dbNoteToDriver) return; const existing = mismatchMap.get(customerId) || {