if(fieldProperties) {
//Check each case statement in model and see if it is present in container model.
cases.map(function(c){
- if(fieldProperties.hasOwnProperty(c.optionValue.split('.')[1])) {
+ if(c.optionValue && fieldProperties.hasOwnProperty(c.optionValue.split('.')[1])) {
utils.assignPathValue(container.model, ['uiState.choice', pathToChoice, 'selected'].join('.'), c.optionValue);
}
});
selectedOptionValue = utils.resolvePath(container.model, ['uiState.choice', pathToChoice, 'selected'].join('.'));
} else {
property.properties.map(function(p) {
- let pname = p.properties[0].name;
+ let pname = p.properties[0] && p.properties[0].name;
if(container.model.hasOwnProperty(pname)) {
utils.assignPathValue(container.model, ['uiState.choice', pathToChoice, 'selected'].join('.'), [p.name, pname].join('.'));
}
value = utils.resolvePath(container.model, ['uiState.choice'].concat(path, 'selected').join('.'));
if(!value) {
property.properties.map(function(p) {
- let pname = p.properties[0].name;
+ let pname = p.properties[0] && p.properties[0].name;
if(container.model.hasOwnProperty(pname)) {
value = container.model[pname];
}