@@ -115,7 +115,6 @@ import { QScopedStyle } from './utils/markers';
115
115
import { addComponentStylePrefix } from './utils/scoped-styles' ;
116
116
import { type WrappedSignal , type ComputedSignal , triggerEffects } from '../signal/signal' ;
117
117
import type { TargetType } from '../signal/store' ;
118
- import { QError , qError } from './error/error' ;
119
118
120
119
// Turn this on to get debug output of what the scheduler is doing.
121
120
const DEBUG : boolean = false ;
@@ -294,7 +293,7 @@ export const createScheduler = (
294
293
}
295
294
while ( choreQueue . length ) {
296
295
const nextChore = choreQueue . shift ( ) ! ;
297
- const order = choreComparator ( nextChore , runUptoChore , rootVNode , false ) ;
296
+ const order = choreComparator ( nextChore , runUptoChore , rootVNode ) ;
298
297
if ( order === null ) {
299
298
continue ;
300
299
}
@@ -462,28 +461,10 @@ function vNodeAlreadyDeleted(chore: Chore): boolean {
462
461
*
463
462
* @param a - The first chore to compare
464
463
* @param b - The second chore to compare
465
- * @param shouldThrowOnHostMismatch - Controls error behavior for mismatched hosts
466
- * @returns A number indicating the relative order of the chores, or null if invalid. A negative
467
- * number means `a` runs before `b`.
464
+ * @returns A number indicating the relative order of the chores. A negative number means `a` runs
465
+ * before `b`.
468
466
*/
469
- function choreComparator (
470
- a : Chore ,
471
- b : Chore ,
472
- rootVNode : ElementVNode | null ,
473
- shouldThrowOnHostMismatch : true
474
- ) : number ;
475
- function choreComparator (
476
- a : Chore ,
477
- b : Chore ,
478
- rootVNode : ElementVNode | null ,
479
- shouldThrowOnHostMismatch : false
480
- ) : number | null ;
481
- function choreComparator (
482
- a : Chore ,
483
- b : Chore ,
484
- rootVNode : ElementVNode | null ,
485
- shouldThrowOnHostMismatch : boolean
486
- ) : number | null {
467
+ function choreComparator ( a : Chore , b : Chore , rootVNode : ElementVNode | null ) : number {
487
468
const macroTypeDiff = ( a . $type$ & ChoreType . MACRO ) - ( b . $type$ & ChoreType . MACRO ) ;
488
469
if ( macroTypeDiff !== 0 ) {
489
470
return macroTypeDiff ;
@@ -511,11 +492,8 @@ function choreComparator(
511
492
You are attempting to change a state that has already been streamed to the client.
512
493
This can lead to inconsistencies between Server-Side Rendering (SSR) and Client-Side Rendering (CSR).
513
494
Problematic Node: ${ aHost . toString ( ) } ` ;
514
- if ( shouldThrowOnHostMismatch ) {
515
- throw qError ( QError . serverHostMismatch , [ errorMessage ] ) ;
516
- }
517
495
logWarn ( errorMessage ) ;
518
- return null ;
496
+ return 1 ;
519
497
}
520
498
}
521
499
@@ -557,7 +535,7 @@ function sortedFindIndex(
557
535
while ( bottom < top ) {
558
536
const middle = bottom + ( ( top - bottom ) >> 1 ) ;
559
537
const midChore = sortedArray [ middle ] ;
560
- const comp = choreComparator ( value , midChore , rootVNode , true ) ;
538
+ const comp = choreComparator ( value , midChore , rootVNode ) ;
561
539
if ( comp < 0 ) {
562
540
top = middle ;
563
541
} else if ( comp > 0 ) {
0 commit comments