fix(tradein/v2): настоящая карта Leaflet+OSM вместо декоративного псевдо-SVG #2528
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue