File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,7 +182,9 @@ export class ViewUtil {
182182 }
183183
184184 this . removeFromQueue ( extendedParent , extendedChild ) ;
185- this . removeFromVisualTree ( extendedParent , extendedChild ) ;
185+ if ( ! isDetachedElement ( extendedChild ) ) {
186+ this . removeFromVisualTree ( extendedParent , extendedChild ) ;
187+ }
186188 }
187189
188190 private removeFromQueue ( parent : NgView , child : NgView ) {
@@ -264,11 +266,6 @@ export class ViewUtil {
264266 this . removeLayoutChild ( parent , child ) ;
265267 } else if ( isContentView ( parent ) && parent . content === child ) {
266268 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
272269 } else if ( isView ( parent ) ) {
273270 parent . _removeView ( child ) ;
274271 }
You can’t perform that action at this time.
0 commit comments