From f8b32dd440caddeaeaf23dfa7a37e7cbae51a0e6 Mon Sep 17 00:00:00 2001 From: nmemmert <67961292+nmemmert@users.noreply.github.com> Date: Tue, 18 Aug 2026 12:52:15 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20MarkerClusterGroup=20CJS=20interop=20?= =?UTF-8?q?=E2=80=94=20unwrap=20.default=20from=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit react-leaflet-cluster uses exports.default instead of module.exports, so Vite's default import resolves to {default: fn} not fn directly. Unwrap with ?. default ?? to get the actual component function. This was never triggered before because the MapContainer only renders when there are GPS points — previously there were none (GPS bug). Co-Authored-By: Claude Sonnet 4.6 --- client/src/components/MapView.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/MapView.jsx b/client/src/components/MapView.jsx index b1ac461..4af94d9 100644 --- a/client/src/components/MapView.jsx +++ b/client/src/components/MapView.jsx @@ -1,6 +1,7 @@ import { useEffect, useState, useMemo, Component } from 'react'; import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'; -import MarkerClusterGroup from 'react-leaflet-cluster'; +import _MarkerClusterGroup from 'react-leaflet-cluster'; +const MarkerClusterGroup = _MarkerClusterGroup?.default ?? _MarkerClusterGroup; import L from 'leaflet'; import { fetchMapPhotos } from '../api/photos.js';