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

fix a bug in edit-config for non-existing startparameterschema

This commit is contained in:
Sonja Happ 2021-05-28 16:16:33 +02:00
parent e8139551c0
commit 90becb2257

View file

@ -88,7 +88,7 @@ class EditConfigDialog extends React.Component {
if (this.props.ics) {
let currentIC = this.props.ics.find(ic => ic.id === parseInt(id, 10));
if (currentIC) {
if (currentIC.startparameterschema.hasOwnProperty('type')) {
if (currentIC.startparameterschema !== null && currentIC.startparameterschema.hasOwnProperty('type')) {
schema = currentIC.startparameterschema;
}
}
@ -142,7 +142,7 @@ class EditConfigDialog extends React.Component {
if (this.props.ics && this.props.config.icID) {
let currentIC = this.props.ics.find(ic => ic.id === parseInt(this.props.config.icID, 10));
if (currentIC) {
if (currentIC.startparameterschema.hasOwnProperty('type')) {
if (currentIC.startparameterschema !== null && currentIC.startparameterschema.hasOwnProperty('type')) {
schema = currentIC.startparameterschema;
}
}