fix(tui): replace spread-into-push in Container.render() to prevent stack overflow, closes #2651
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user