From 5a3d8afd037fded5635eff39bb55438de02780e0 Mon Sep 17 00:00:00 2001 From: John Wu <76966357+jwu-fisker@users.noreply.github.com> Date: Wed, 5 Oct 2022 08:41:07 -0700 Subject: [PATCH] CEC-2585 Fix carsconnected errors (#214) --- src/components/VehicleMap/index.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/VehicleMap/index.jsx b/src/components/VehicleMap/index.jsx index 6a98059..253c813 100644 --- a/src/components/VehicleMap/index.jsx +++ b/src/components/VehicleMap/index.jsx @@ -75,7 +75,9 @@ const Component = () => { useEffect(() => { if (!token) return; if (markers.length > 0) { - const vins = markers.map((marker) => marker[2]); + const vins = markers + .filter((marker) => marker[2].length > 0) + .map((marker) => marker[2]); getConnections(vins, token).then((conns) => { setConnections(conns); });