more robust check

pull/1520/head
Piero Toffanin 2024-07-08 12:17:15 -04:00
rodzic 42e94b1744
commit 4604f0bb71
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -62,7 +62,9 @@ class MapView extends React.Component {
let thermalCount = 0;
for (let item of this.props.mapItems){
if (item.meta && item.meta.task && item.meta.task.orthophoto_bands){
if (item.meta.task.orthophoto_bands.length === 2 && item.meta.task.orthophoto_bands && item.meta.task.orthophoto_bands[0].description.toLowerCase() === "lwir"){
if (item.meta.task.orthophoto_bands.length === 2 && item.meta.task.orthophoto_bands &&
item.meta.task.orthophoto_bands[0] && typeof(item.meta.task.orthophoto_bands[0].description) === "string" &&
item.meta.task.orthophoto_bands[0].description.toLowerCase() === "lwir"){
thermalCount++;
}
}