defaultValue = getFile(getCurrent.value[name])
Function getFile:
const getFile = async (id) => {
const data = store.dispatch(Actions.FILE, id).then(() => {
const data = [{ description: store.getters.currentFile.description, url: 'https://test.com/uploads/'+ store.getters.currentFile.name }]
return data
})
return data
}
If I console.log(defaultValue): I see the following output;
But I need a array instead of this Promise thing. How to solve?