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
|
|
@ -182,7 +182,9 @@ export default function Terminals(props: Props) {
|
|||
if(loading) return
|
||||
setLoading(true)
|
||||
terminalAPI.listTerminals(200, 0, "asc", "name", as).then(resp => {
|
||||
setTerminals(resp.data.terminals.map(a => Terminal.any(a)));
|
||||
if(resp.data.terminals){
|
||||
setTerminals(resp.data.terminals.map(a => Terminal.any(a)));
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log("There was a problem loading Terminals")
|
||||
}).finally(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue