// We stick in a string when the user actually sets it to simplify things
// but the correct thing happens when we serialize to user data
let isEmptyLeafPresent = (value === EMPTY_LEAF_PRESENT || value === null);
- let present = isEmptyLeafPresent ? EMPTY_LEAF_PRESENT : "";
+ let present = isEmptyLeafPresent ? EMPTY_LEAF_PRESENT : [null];
const options = [
<option key={'true'} value={EMPTY_LEAF_PRESENT}>Enabled</option>,
<option key={'false'} value="">Not Enabled</option>
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];
}