mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): fix ssr log querySelector (#28864)
This commit is contained in:
parent
8880cb25ef
commit
c5f3292d63
@ -40,7 +40,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
const nuxtLogsElement = document.querySelector(`[data-nuxt-logs="${nuxtApp._name}"]`)
|
||||
const nuxtLogsElement = document.querySelector(`[data-nuxt-logs="${nuxtApp._id}"]`)
|
||||
const content = nuxtLogsElement?.textContent
|
||||
const logs = content ? parse(content, { ...devRevivers, ...nuxtApp._payloadRevivers }) as LogObject[] : []
|
||||
await nuxtApp.hooks.callHook('dev:ssr-logs', logs)
|
||||
|
Loading…
Reference in New Issue
Block a user