File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,9 @@ export class ViewUtil {
182
182
}
183
183
184
184
this . removeFromQueue ( extendedParent , extendedChild ) ;
185
- this . removeFromVisualTree ( extendedParent , extendedChild ) ;
185
+ if ( ! isDetachedElement ( extendedChild ) ) {
186
+ this . removeFromVisualTree ( extendedParent , extendedChild ) ;
187
+ }
186
188
}
187
189
188
190
private removeFromQueue ( parent : NgView , child : NgView ) {
@@ -264,11 +266,6 @@ export class ViewUtil {
264
266
this . removeLayoutChild ( parent , child ) ;
265
267
} else if ( isContentView ( parent ) && parent . content === child ) {
266
268
parent . content = null ;
267
- } else if ( child . nodeName === "DetachedContainer" ) {
268
- // Skip - DetachedContainer is... well detached from its parent
269
- // Used with ListViews and other TemplatedItemsComponent views.
270
- } else if ( child . nodeName === "FormattedString" || child . nodeName === "Span" ) {
271
- // Removing FormattedString and its Spans from a Label throws an exception
272
269
} else if ( isView ( parent ) ) {
273
270
parent . _removeView ( child ) ;
274
271
}
You can’t perform that action at this time.
0 commit comments