Async not recognized/working as intended
[issue link]I’m trying to fetch some data with nuxtServerInit like so:
async nuxtServerInit ({ commit }, context) {
if (context.req.headers.cookie) {
if (context.req.headers.cookie.split(';').find(c => c.trim().startsWith('token='))) {
const token = context.req.headers.cookie.split(';').find(c => c.trim().startsWith('token=')).substr(7)
await dispatch('CHECK_USER', token)
}
}
}
But I get the following error:

And ideas why that is?