File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
packages/runtime-core/src/core/render Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -446,6 +446,14 @@ export default class DomilyRenderSchema<
446446 this . __dom ?. appendChild ( nextMappedListFragment ) ;
447447 }
448448
449+ gatherInternalEffectAborts ( gatherArray : ( ( ) => void ) [ ] ) {
450+ for ( const abort of this . _internalEffectAborts ) {
451+ if ( isFunction ( abort ) ) {
452+ gatherArray . push ( abort ) ;
453+ }
454+ }
455+ }
456+
449457 abortEffect ( ) {
450458 for ( const abort of this . _internalEffectAborts ) {
451459 isFunction ( abort ) && abort ( ) ;
@@ -513,6 +521,9 @@ export default class DomilyRenderSchema<
513521 if ( previousDomIf === nextDomIf ) {
514522 return ;
515523 }
524+ if ( ! this . __dom ?. isConnected ) {
525+ return ;
526+ }
516527 if ( ! nextDomIf ) {
517528 this . __dom = this . domInterrupter ( replaceDOM ( this . __dom , c ( "dom-if" ) ) ) ;
518529 } else {
Original file line number Diff line number Diff line change @@ -222,5 +222,9 @@ export function domilyChildToDOM(
222222 gatherChildLifeCycleQueue . push ( lifecycle ) ;
223223 }
224224
225+ if ( Array . isArray ( gatherEffectAborts ) ) {
226+ childSchema . gatherInternalEffectAborts ( gatherEffectAborts ) ;
227+ }
228+
225229 return dom ;
226230}
You can’t perform that action at this time.
0 commit comments