Handle undefined bands case

pull/1203/head
Piero Toffanin 2022-07-07 00:25:42 -04:00
rodzic 1100c28f94
commit 43c9e68629
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -136,7 +136,9 @@ export default class LayersControlLayer extends React.Component {
const algo = this.getAlgorithm(e.target.value);
if (algo && algo['filters'].indexOf(bands) === -1) bands = algo['filters'][0]; // Pick first
this.setState({formula: e.target.value, bands});
if (bands !== undefined){
this.setState({formula: e.target.value, bands});
}
}
getAlgorithm = id => {