fix: prettier formatting - extract filter callback to avoid line breaks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Renato Alcara
2026-02-14 22:10:53 -03:00
parent be15192f63
commit ad2d859743
+3 -8
View File
@@ -1536,14 +1536,9 @@ export const makeMessagesSocket = (config: SocketConfig) => {
if (!node) return ''
const pad = ' '.repeat(indent)
const tag = node.tag || '?'
const attrEntries = node.attrs
? Object.entries(node.attrs).filter(
([, v]) => v !== undefined && v !== null
)
: []
const attrStr = attrEntries.length > 0
? ' ' + attrEntries.map(([k, v]) => `${k}="${v}"`).join(' ')
: ''
const filteredAttrs = ([, v]: [string, unknown]) => v !== undefined && v !== null
const attrEntries = node.attrs ? Object.entries(node.attrs).filter(filteredAttrs) : []
const attrStr = attrEntries.length > 0 ? ' ' + attrEntries.map(([k, v]) => `${k}="${v}"`).join(' ') : ''
if (!node.content) return `${pad}<${tag}${attrStr}/>`