fix(observer): 깨진 문자열 리터럴 2건 수정 — walkNode 크래시 해결 (v0.5.87)

This commit is contained in:
Variet Worker
2026-04-19 07:51:29 +09:00
parent 12095f36a4
commit cd00986274
3 changed files with 5 additions and 5 deletions

View File

@@ -377,7 +377,7 @@ export function generateApprovalObserverScript(_port: number): string {
var _conversationDumpCount=0;
function walkNode(el, depth, maxDepth, maxChildren) {
if (depth > maxDepth) return {tag:'??,text:'depth limit'};
if (depth > maxDepth) return {tag:'MAX',text:'depth limit'};
if (!el || !el.tagName) return null;
var info = {
tag: el.tagName ? el.tagName.toLowerCase() : '#text',
@@ -413,7 +413,7 @@ export function generateApprovalObserverScript(_port: number): string {
if (childInfo) info.children.push(childInfo);
}
if (el.children.length > limit) {
info.children.push({tag: '??, text: '+' + (el.children.length - limit) + ' more children'});
info.children.push({tag: 'TRUNC', text: '+' + (el.children.length - limit) + ' more children'});
}
}
return info;