mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:08:32 +00:00
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;
|
||||
});
|
||||
})
|
||||
.flat();
|
||||
.flat()
|
||||
.filter(Boolean);
|
||||
|
||||
mapRef.current?.map?.setFitView(overlays);
|
||||
|
||||
const events = overlays.map((o: AMap.Marker) => {
|
||||
|
@ -173,7 +173,8 @@ export const GoogleMapsBlock = (props) => {
|
||||
return overlay;
|
||||
});
|
||||
})
|
||||
.flat();
|
||||
.flat()
|
||||
.filter(Boolean);
|
||||
|
||||
overlaysRef.current = overlays;
|
||||
mapRef.current?.setFitView(overlays);
|
||||
|
Loading…
Reference in New Issue
Block a user