Skip to content

Commit 89e9ee6

Browse files
author
Vikas Agarwal
committed
Merge branch 'hotfix/deep_link_not_working'
2 parents e86348f + 6621d57 commit 89e9ee6

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
@@ -220,7 +220,7 @@ export function findProductCategory(product) {
220220
for(const prd in products[pType].subtypes) {
221221
const subType = products[pType].subtypes[prd]
222222
if (subType.id === product && !subType.disabled) {
223-
return pType
223+
return { ...products[pType], name: pType}
224224
}
225225
}
226226
}

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)