0👍
If all you’re trying to do is use async/await
with axios in nuxtServerInit
:
export default function nuxtServerInit ({ commit, dispatch }, { req, res }) {
try {
await dispatch('core/load')
} catch (err) {
}
}
And in your module:
async load() {
return await this.$axios....
}
- [Vuejs]-Test is passing, but assertion error given after
- [Vuejs]-How to remove the error reported by lint check, in the style of the vue file?
Source:stackexchange.com