diff --git a/platform/commonUI/browse/src/creation/CreateWizard.js b/platform/commonUI/browse/src/creation/CreateWizard.js index 4073ed7e90..e902301977 100644 --- a/platform/commonUI/browse/src/creation/CreateWizard.js +++ b/platform/commonUI/browse/src/creation/CreateWizard.js @@ -59,10 +59,10 @@ define( var locatingType = locatingObject && locatingObject.getCapability('type'); return locatingType && policyService.allow( - "composition", - locatingType, - type - ); + "composition", + locatingType, + type + ); } sections.push({ @@ -77,6 +77,9 @@ define( row.key = index; return row; + }).filter(function (row) { + // Only show rows which have defined controls + return row && row.control; }) }); diff --git a/platform/commonUI/browse/test/creation/CreateWizardSpec.js b/platform/commonUI/browse/test/creation/CreateWizardSpec.js index 7cd78e5178..c4453e7432 100644 --- a/platform/commonUI/browse/test/creation/CreateWizardSpec.js +++ b/platform/commonUI/browse/test/creation/CreateWizardSpec.js @@ -42,7 +42,9 @@ define( "property" + name, [ "getDefinition", "getValue", "setValue" ] ); - mockProperty.getDefinition.andReturn({}); + mockProperty.getDefinition.andReturn({ + control: "textfield" + }); mockProperty.getValue.andReturn(name); return mockProperty; } @@ -157,4 +159,4 @@ define( }); } -); \ No newline at end of file +);