mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +00:00
fix(nuxt): ignore console.logs called outside event context
resolves https://github.com/nuxt/nuxt/issues/26308
This commit is contained in:
parent
551ffaa9d5
commit
b3ced3d694
@ -25,7 +25,9 @@ export default (nitroApp: NitroApp) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onConsoleLog((_log) => {
|
onConsoleLog((_log) => {
|
||||||
const ctx = asyncContext.use()
|
const ctx = asyncContext.tryUse()
|
||||||
|
if (!ctx) { return }
|
||||||
|
|
||||||
const stack = getStack()
|
const stack = getStack()
|
||||||
if (stack.includes('runtime/vite-node.mjs')) { return }
|
if (stack.includes('runtime/vite-node.mjs')) { return }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user