Skip to content

Commit f770793

Browse files
authored
logger: skip logging full element (#85194)
1 parent 074262b commit f770793

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/next/src/next-devtools/userspace/app/forward-logs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ class ClientFileLogger {
4949
return String(arg)
5050
if (arg === null) return 'null'
5151
if (arg === undefined) return 'undefined'
52+
// Handle DOM nodes - only log the tag name to avoid React proxied elements
53+
if (arg instanceof Element) {
54+
return `<${arg.tagName.toLowerCase()}>`
55+
}
5256
return safeStringifyWithDepth(arg)
5357
})
5458
.join(' ')

0 commit comments

Comments
 (0)