Skip to content

Commit 0477044

Browse files
authored
fix(core): FormattedString.spans is now restored (#9960)
1 parent 20efd36 commit 0477044

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/core/ui/text-base/formatted-string.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ export class FormattedString extends ViewBase implements FormattedStringDefiniti
7676

7777
public toString(): string {
7878
let result = '';
79-
for (let i = 0, length = this._spans.length; i < length; i++) {
80-
result += this._spans.getItem(i).text;
79+
for (let i = 0, length = this.spans.length; i < length; i++) {
80+
result += this.spans.getItem(i).text;
8181
}
8282

8383
return result;
8484
}
8585

8686
public _addArrayFromBuilder(name: string, value: Array<any>) {
8787
if (name === 'spans') {
88-
this.spans.push(value);
88+
this.spans.push(...value);
8989
}
9090
}
9191

0 commit comments

Comments
 (0)