hotix for undefined data loads on map pages
This commit is contained in:
parent
7b78d7ba91
commit
46881f6656
5 changed files with 106 additions and 79 deletions
|
|
@ -142,6 +142,7 @@ export default function ConstructionMapController(props: Props) {
|
|||
siteAPI
|
||||
.listSitesPageData(50, 0, "asc", "key", undefined, as)
|
||||
.then(resp => {
|
||||
if(resp.data.sites){
|
||||
resp.data.sites.forEach(site => {
|
||||
if (!site) return;
|
||||
let newSite: Site = Site.any(site.site);
|
||||
|
|
@ -179,6 +180,7 @@ export default function ConstructionMapController(props: Props) {
|
|||
place_type: ["site"]
|
||||
} as Result);
|
||||
});
|
||||
}
|
||||
setSiteMarkerData(sm);
|
||||
setSites(s);
|
||||
setLoadingSites(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue