fix(tradein/v2): настоящая карта Leaflet+OSM вместо декоративного псевдо-SVG #2528

Merged
lekss361 merged 2 commits from fix/tradein-v2-real-map into main 2026-07-26 20:02:29 +00:00
Showing only changes of commit 99f1a4a733 - Show all commits

View file

@ -911,6 +911,13 @@ export default function ParamsPanel({
let map: any = null; let map: any = null;
let cancelled = false; let cancelled = false;
// Reset a previous CDN failure before retrying. Without this the error
// branch is a dead end: it replaces the map container in the render tree,
// so mapContainerRef stays null and no later attempt can ever succeed —
// one transient unpkg blip would kill the map for the rest of the session
// even after the user picks a different address.
setMapLoadError(false);
loadLeaflet() loadLeaflet()
.then((L) => { .then((L) => {
if (cancelled || !mapContainerRef.current || !coordsRef.current) return; if (cancelled || !mapContainerRef.current || !coordsRef.current) return;