Skip to content

Commit 91dcc4a

Browse files
author
Vikas Agarwal
committed
Merge branch 'hotfix/deep_link_not_working' into dev
2 parents daf6088 + 6621d57 commit 91dcc4a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/config/projectWizard/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export function findProductCategory(product) {
221221
for(const prd in products[pType].subtypes) {
222222
const subType = products[pType].subtypes[prd]
223223
if (subType.id === product && !subType.disabled) {
224-
return pType
224+
return { ...products[pType], name: pType}
225225
}
226226
}
227227
}

src/projects/create/components/ProjectWizard.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import _ from 'lodash'
22
import { unflatten } from 'flat'
33
import React, { Component, PropTypes } from 'react'
44

5-
import { findCategory, findProductsOfCategory, getProjectCreationTemplateField } from '../../../config/projectWizard'
5+
import { findCategory, findProductCategory, findProductsOfCategory, getProjectCreationTemplateField } from '../../../config/projectWizard'
66
import Wizard from '../../../components/Wizard'
77
import SelectProjectType from './SelectProjectType'
88
import SelectProduct from './SelectProduct'
@@ -64,12 +64,12 @@ class ProjectWizard extends Component {
6464
// first try the path param to be a project category
6565
let projectType = findCategory(params.product)
6666
if (projectType) {// if its a category
67-
updateQuery['type'] = { $set : projectType }
67+
updateQuery['type'] = { $set : projectType.id }
6868
wizardStep = WZ_STEP_SELECT_PROD_TYPE
6969
} else {
7070
// if it is not a category, it should be a product and we should be able to find a category for it
71-
projectType = findProductsOfCategory(params.product)
72-
updateQuery['type'] = { $set : projectType }
71+
projectType = findProductCategory(params.product)
72+
updateQuery['type'] = { $set : projectType.id }
7373
updateQuery['details'] = { products : { $set: [params.product] } }
7474
wizardStep = WZ_STEP_FILL_PROJ_DETAILS
7575
}

0 commit comments

Comments
 (0)