mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(core): FormattedString.spans is now restored (#9960)
This commit is contained in:
committed by
GitHub
parent
20efd3605e
commit
0477044d6f
@@ -76,8 +76,8 @@ export class FormattedString extends ViewBase implements FormattedStringDefiniti
|
||||
|
||||
public toString(): string {
|
||||
let result = '';
|
||||
for (let i = 0, length = this._spans.length; i < length; i++) {
|
||||
result += this._spans.getItem(i).text;
|
||||
for (let i = 0, length = this.spans.length; i < length; i++) {
|
||||
result += this.spans.getItem(i).text;
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -85,7 +85,7 @@ export class FormattedString extends ViewBase implements FormattedStringDefiniti
|
||||
|
||||
public _addArrayFromBuilder(name: string, value: Array<any>) {
|
||||
if (name === 'spans') {
|
||||
this.spans.push(value);
|
||||
this.spans.push(...value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user