fix(tui): replace spread-into-push in Container.render() to prevent stack overflow, closes #2651

This commit is contained in:
Mario Zechner
2026-04-09 03:32:59 +02:00
parent 4f7fc9de7e
commit 3b7448d156
2 changed files with 8 additions and 1 deletions

View File

@@ -202,7 +202,10 @@ export class Container implements Component {
render(width: number): string[] {
const lines: string[] = [];
for (const child of this.children) {
lines.push(...child.render(width));
const childLines = child.render(width);
for (const line of childLines) {
lines.push(line);
}
}
return lines;
}