Open StringKe opened 4 years ago
Thanks for opening this issue, a maintainer will get back to you shortly! Be sure to follow the issue template! 🤓
Other situations:
axios.js
export default function ({ $axios, redirect, $warehouse }) {
$axios.onRequest((config) => {
const token = $warehouse.get('token')
if (token) {
config.headers.Authorization = token
}
console.log('Making request to ' + config.url)
})
$axios.onError((error) => {
const code = parseInt(error.response && error.response.status)
if (code === 400) {
redirect('/400')
}
})
}
server render error:
ERROR Cannot read property 'read' of undefined
at Object.get (node_modules/store/src/store-engine.js:22:27)
at Object._checkExpiration (node_modules/store/plugins/expire.js:52:32)
at Object.expire_get (node_modules/store/plugins/expire.js:25:21)
at Object.pluginFn (node_modules/store/src/store-engine.js:140:25)
at super_fn (node_modules/store/src/store-engine.js:133:19)
at Object.get (node_modules/store/plugins/defaults.js:16:13)
at Object.pluginFn [as get] (node_modules/store/src/store-engine.js:140:25)
at server.js:61235:30
at server.js:354:45
Is your feature request related to a problem? Please describe. Unable to write cookie in nuxt asyncdata
Describe the solution you'd like write cookie in nuxt asyncdata
Describe alternatives you've considered none
Additional context