fix(plugin-map): should filter empty data, Close T-1380 (#2447)
This commit is contained in:
parent
26cd9e810c
commit
95a0e2de83
@ -137,7 +137,9 @@ export const AMapBlock = (props) => {
|
|||||||
return overlay;
|
return overlay;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.flat();
|
.flat()
|
||||||
|
.filter(Boolean);
|
||||||
|
|
||||||
mapRef.current?.map?.setFitView(overlays);
|
mapRef.current?.map?.setFitView(overlays);
|
||||||
|
|
||||||
const events = overlays.map((o: AMap.Marker) => {
|
const events = overlays.map((o: AMap.Marker) => {
|
||||||
|
@ -173,7 +173,8 @@ export const GoogleMapsBlock = (props) => {
|
|||||||
return overlay;
|
return overlay;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.flat();
|
.flat()
|
||||||
|
.filter(Boolean);
|
||||||
|
|
||||||
overlaysRef.current = overlays;
|
overlaysRef.current = overlays;
|
||||||
mapRef.current?.setFitView(overlays);
|
mapRef.current?.setFitView(overlays);
|
||||||
|
Loading…
Reference in New Issue
Block a user