Skip to content

Commit 796a118

Browse files
committed
fix: edge case
1 parent 9a50eb7 commit 796a118

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/visualisation/src/Map.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ const Map = ({
565565
if (!cars.length) return
566566
if (!activeCar) return
567567
const car = cars.filter(({ id }) => id === activeCar.id)[0]
568+
if (!car) return
568569
setMapState((state) => ({
569570
...state,
570571
zoom: 14,

0 commit comments

Comments
 (0)