TypeError
Cannot read properties of undefined (reading 'indexOf')
pages/_lang/Community/_id.vue:137:
asyncData
async asyncData({ app, params, req, store }) {
const { locale } = store.state;
let cookies = req ? req.headers.cookie : document.cookie;
// 'name'为具体key,这里只是举例)
let arr = [];
if (cookies.indexOf(";") != -1) {
arr = cookies.split(";");
}
let cityId = "";
arr.forEach((element) => {
if (element.includes("city=")) {
.nuxt/utils.js:318:
promisify
data = data || {}
resolve(data)
})
})
} else {
promise = fn(context)
}
if (promise && promise instanceof Promise && typeof promise.then === 'function') {
return promise
}
.nuxt/server.js:275:
module.exports../.nuxt/server.js.__webpack_exports__.default
if (!Components.length) {
return render404Page()
}
// Call asyncData & fetch hooks on components matched by the route.
const asyncDatas = await Promise.all(Components.map((Component) => {
const promises = []
// Call asyncData(context)
if (Component.options.asyncData && typeof Component.options.asyncData === 'function') {
const promise = promisify(Component.options.asyncData, app.context)
Request Details
URI |
/Community/newyork-NJ |
Request Method |
GET |
HTTP Version |
1.1 |
Connection |
upgrade |
Headers
HOST |
www.uswoo.com |
X-REAL-IP |
52.55.214.236 |
X-FORWARDED-FOR |
52.55.214.236 |
VIA |
nginx |
X-FORWARDED-PROTO |
https |
ACCEPT |
*/* |
USER-AGENT |
claudebot |
Cookies