* Hot-fix of bug with rendering a variable from vuex store before it's load(when variable is null)
feature: no-task
This commit is contained in:
@@ -18,10 +18,15 @@ export default {
|
||||
const contracts = await getContracts()
|
||||
commit('initContracts', contracts)
|
||||
},
|
||||
async fetchContractById({ commit }, id) {
|
||||
const currentContract = await getContractById(id)
|
||||
commit('setCurrentContract', currentContract)
|
||||
async fetchContractById({ commit, state }, id) {
|
||||
const contract = await getContractById(id)
|
||||
commit('setCurrentContract', contract)
|
||||
return state.currentContract
|
||||
}
|
||||
},
|
||||
getters: {}
|
||||
getters: {
|
||||
currentContract: state => {
|
||||
return state.currentContract
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user