From 0d40bcd8ad88f3749ff70466d0353ff23070d924 Mon Sep 17 00:00:00 2001 From: KIRAN KASHALKAR Date: Thu, 4 May 2017 23:35:24 -0400 Subject: [PATCH] NOTICKET: Bug with VNFD view for some choices Signed-off-by: KIRAN KASHALKAR --- .../src/src/components/EditDescriptorModelProperties.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js b/skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js index c923ede7f..ad2bf3dc9 100644 --- a/skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js +++ b/skyquake/plugins/composer/src/src/components/EditDescriptorModelProperties.js @@ -538,7 +538,7 @@ export default function EditDescriptorModelProperties(props) { 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('.')); } @@ -747,7 +747,7 @@ export default function EditDescriptorModelProperties(props) { 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]; } -- 2.25.1