@@ -355,6 +355,13 @@ This is often caused by modifying a signal in an already rendered component duri
355355 chore . $type$ !== ChoreType . QRL_RESOLVE && chore . $type$ !== ChoreType . RUN_QRL ;
356356
357357 if ( shouldBlock ) {
358+ const runningChore = getRunningChore ( chore ) ;
359+ if ( runningChore ) {
360+ if ( isResourceChore ( runningChore ) ) {
361+ addBlockedChore ( chore , runningChore , blockedChores ) ;
362+ }
363+ return chore ;
364+ }
358365 const blockingChore = findBlockingChore (
359366 chore ,
360367 choreQueue ,
@@ -366,12 +373,6 @@ This is often caused by modifying a signal in an already rendered component duri
366373 addBlockedChore ( chore , blockingChore , blockedChores ) ;
367374 return chore ;
368375 }
369-
370- const runningChore = getRunningChore ( chore ) ;
371- if ( runningChore ) {
372- addBlockedChore ( chore , runningChore , blockedChores ) ;
373- return chore ;
374- }
375376 }
376377
377378 addChoreAndIncrementBlockingCounter ( chore , choreQueue ) ;
@@ -890,19 +891,20 @@ function vNodeAlreadyDeleted(chore: Chore): boolean {
890891 return ! ! ( chore . $host$ && vnode_isVNode ( chore . $host$ ) && chore . $host$ . flags & VNodeFlags . Deleted ) ;
891892}
892893
894+ function isResourceChore ( chore : Chore ) : boolean {
895+ return (
896+ chore . $type$ === ChoreType . TASK &&
897+ ! ! chore . $payload$ &&
898+ ! ! ( ( chore . $payload$ as Task ) . $flags$ & TaskFlags . RESOURCE )
899+ ) ;
900+ }
901+
893902export function addBlockedChore (
894903 blockedChore : Chore ,
895904 blockingChore : Chore ,
896905 blockedChores : ChoreArray
897906) : void {
898- if (
899- ! (
900- blockedChore . $type$ === ChoreType . TASK &&
901- blockedChore . $payload$ &&
902- ( blockedChore . $payload$ as Task ) . $flags$ & TaskFlags . RESOURCE
903- ) &&
904- choreComparator ( blockedChore , blockingChore ) === 0
905- ) {
907+ if ( ! isResourceChore ( blockedChore ) && choreComparator ( blockedChore , blockingChore ) === 0 ) {
906908 return ;
907909 }
908910 DEBUG &&
0 commit comments