1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

bugfix: configSnapshots empty or null

This commit is contained in:
irismarie 2021-02-16 19:41:32 +01:00
parent af8b9ab033
commit b0e9ba4d1c

View file

@ -700,11 +700,19 @@ class Scenario extends React.Component {
}
openResultConfigSnaphots(result) {
this.setState({
modalResultConfigs: JSON.parse(result.configSnapshots),
modalResultConfigsIndex: result.id,
resultConfigsModal: true
});
if (!result.configSnapshots || result.configSnapshots == "") {
this.setState({
modalResultConfigs: {"configs": []},
modalResultConfigsIndex: result.id,
resultConfigsModal: true
});
} else {
this.setState({
modalResultConfigs: JSON.parse(result.configSnapshots),
modalResultConfigsIndex: result.id,
resultConfigsModal: true
});
}
}
closeResultConfigSnapshots() {