Skip to content

Commit 493d062

Browse files
committed
fix(ViewUtil): Removing FormattedString throw
When removing the children from a Label and one of these children is a FormattedString, the FormattedTextProperty throw this exception: "TypeError: Cannot read property 'textTransform' of undefined"
1 parent cf4eba4 commit 493d062

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nativescript-angular/view-util.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ export class ViewUtil {
265265
} else if (child.nodeName === "DetachedContainer") {
266266
// Skip - DetachedContainer is... well detached from its parent
267267
// Used with ListViews and other TemplatedItemsComponent views.
268+
} else if (child.nodeName === "FormattedString") {
269+
// Removing FormattedString and its Spans from a Label throws an exception
268270
} else if (isView(parent)) {
269271
parent._removeView(child);
270272
}

0 commit comments

Comments
 (0)