File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
packages/qwik/src/core/shared/vnode Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,6 @@ export const enum ChoreBits {
99 CLEANUP = 1 << 6 ,
1010 // marker used to identify if vnode has visible tasks
1111 VISIBLE_TASKS = 1 << 7 ,
12+ OPERATION = 1 << 8 ,
1213 DIRTY_MASK = TASKS | NODE_DIFF | COMPONENT | NODE_PROPS | COMPUTE | CHILDREN | CLEANUP ,
1314}
Original file line number Diff line number Diff line change @@ -54,16 +54,14 @@ export function addVNodeOperation(
5454) : void {
5555 vNode . operation = operation ;
5656
57+ let parent : VNode | null ;
5758 let child : VNode = vNode ;
58- let parent : VNode | null = vNode . parent || vNode . slotParent ;
59- while (
60- parent &&
61- ! ( parent . dirty & ChoreBits . DIRTY_MASK && parent . dirtyChildren ?. includes ( child ) )
62- ) {
59+ // We must make sure the flush operation finds this vNode
60+ while ( ! child . dirty && ( parent = child . parent || child . slotParent ) && ! parent . dirtyChildren ) {
6361 parent . dirtyChildren ||= [ ] ;
6462 parent . dirtyChildren . push ( child ) ;
65- parent . dirty |= ChoreBits . CHILDREN ;
63+ // mark a little dirty so we don't add it again
64+ child . dirty |= ChoreBits . OPERATION ;
6665 child = parent ;
67- parent = parent . parent || parent . slotParent ;
6866 }
6967}
You can’t perform that action at this time.
0 commit comments