Skip to content

Commit

Permalink
fix(nuxt): ignore console.logs called outside event context
Browse files Browse the repository at this point in the history
resolves #26308
  • Loading branch information
danielroe committed Mar 17, 2024
1 parent 551ffaa commit b3ced3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/nuxt/src/core/runtime/nitro/dev-server-logs.ts
Expand Up @@ -25,7 +25,9 @@ export default (nitroApp: NitroApp) => {
}

onConsoleLog((_log) => {
const ctx = asyncContext.use()
const ctx = asyncContext.tryUse()
if (!ctx) { return }

const stack = getStack()
if (stack.includes('runtime/vite-node.mjs')) { return }

Expand Down

0 comments on commit b3ced3d

Please sign in to comment.