aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js30
1 files changed, 17 insertions, 13 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js
index 9b147415f9..d1ba947f81 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js
@@ -14,17 +14,21 @@
* permissions and limitations under the License.
*/
export default {
-
- getCurrentCategoryOfSubCategory(selectedSubCategory, softwareProductCategories) {
- let category, subCategory;
- for (var i = 0; i < softwareProductCategories.length; i++) {
- let {subcategories = []} = softwareProductCategories[i];
- subCategory = subcategories.find(sub => sub.uniqueId === selectedSubCategory);
- if (subCategory) {
- category = softwareProductCategories[i].uniqueId;
- break;
- }
- }
- return category;
- }
+ getCurrentCategoryOfSubCategory(
+ selectedSubCategory,
+ softwareProductCategories
+ ) {
+ let category, subCategory;
+ for (var i = 0; i < softwareProductCategories.length; i++) {
+ let { subcategories = [] } = softwareProductCategories[i];
+ subCategory = subcategories.find(
+ sub => sub.uniqueId === selectedSubCategory
+ );
+ if (subCategory) {
+ category = softwareProductCategories[i].uniqueId;
+ break;
+ }
+ }
+ return category;
+ }
};