Skip to content

Commit

Permalink
more robust check
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Jul 8, 2024
1 parent 42e94b1 commit 4604f0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/static/app/js/MapView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
Expand Down

0 comments on commit 4604f0b

Please sign in to comment.