From f739ddb541ed36e9e64fe08213d790121ea89a00 Mon Sep 17 00:00:00 2001 From: miriame Date: Sun, 22 Oct 2017 16:30:35 +0300 Subject: fix error when moving to previous version Change-Id: I1ab9ccd59370836a47769aa57e79186cbe001566 Issue-ID: SDC-489 Signed-off-by: miriame --- openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js index 6426847cfc..ae3d3932ed 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js @@ -274,8 +274,9 @@ const mapActionsToProps = (dispatch, {currentScreen: {screen, props: {softwarePr const props = { onVersionSwitching: (version, meta) => { + const screenToLoad = !currentComponentId ? screen : enums.SCREEN.SOFTWARE_PRODUCT_COMPONENTS; SoftwareProductActionHelper.fetchSoftwareProduct(dispatch, {softwareProductId, version}); - props.onNavigate({id: getActiveNavigationId(screen, currentComponentId), meta, version}); + props.onNavigate({id: getActiveNavigationId(screenToLoad), meta, version}); }, onToggle: (groups, itemIdToExpand) => groups.map(({items}) => SoftwareProductActionHelper.toggleNavigationItems(dispatch, {items, itemIdToExpand})), onNavigate: ({id, meta, version}) => { -- cgit 1.2.3-korg