|
|
@@ -44,17 +44,17 @@ export const actions = {
|
|
|
.then(response => {
|
|
|
commit('storeInfo/GET_COMMODITY_SUCCESS', response.data)
|
|
|
let commodity = response.data || {}
|
|
|
- if(commodity.uuid) {
|
|
|
- commit('storeInfo/REQUEST_COMPONENT')
|
|
|
+ commit('storeInfo/REQUEST_COMPONENT')
|
|
|
+ if (commodity.uuid) {
|
|
|
return axios.get(`/api/commodity/component/${commodity.uuid}`)
|
|
|
.then(response => {
|
|
|
commit('storeInfo/GET_COMPONENT_SUCCESS', response.data)
|
|
|
- return Promise.all([
|
|
|
- findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
|
|
|
- ])
|
|
|
+ return findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
|
|
|
}, err => {
|
|
|
commit('storeInfo/GET_COMPONENT_FAILURE', err)
|
|
|
})
|
|
|
+ } else {
|
|
|
+ return findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
|
|
|
}
|
|
|
}, err => {
|
|
|
commit('storeInfo/GET_COMMODITY_FAILURE', err)
|