@@ -137,9 +137,11 @@ function applyStateFast(next: any, target: any, keyFn: (item: NonNullable<any>)
137137 } else if ( next . length ) {
138138 for ( let i = 0 , len = next . length ; i < len ; i ++ ) {
139139 const item = previous [ i ] ;
140- isWrappable ( item )
141- ? applyState ( next [ i ] , wrap ( item , target ) , keyFn )
142- : target [ STORE_NODE ] [ i ] && setSignal ( target [ STORE_NODE ] [ i ] , next [ i ] ) ;
140+ if ( isWrappable ( item ) ) applyState ( next [ i ] , wrap ( item , target ) , keyFn ) ;
141+ else {
142+ if ( item !== next [ i ] ) changed = true ;
143+ target [ STORE_NODE ] [ i ] && setSignal ( target [ STORE_NODE ] [ i ] , next [ i ] ) ;
144+ }
143145 }
144146 }
145147
@@ -279,9 +281,11 @@ function applyStateSlow(next: any, target: any, keyFn: (item: NonNullable<any>)
279281 } else if ( next . length ) {
280282 for ( let i = 0 , len = next . length ; i < len ; i ++ ) {
281283 const item = getOverrideValue ( previous , override , i as any , optOverride ) ;
282- isWrappable ( item )
283- ? applyState ( next [ i ] , wrap ( item , target ) , keyFn )
284- : target [ STORE_NODE ] [ i ] && setSignal ( target [ STORE_NODE ] [ i ] , next [ i ] ) ;
284+ if ( isWrappable ( item ) ) applyState ( next [ i ] , wrap ( item , target ) , keyFn ) ;
285+ else {
286+ if ( item !== next [ i ] ) changed = true ;
287+ target [ STORE_NODE ] [ i ] && setSignal ( target [ STORE_NODE ] [ i ] , next [ i ] ) ;
288+ }
285289 }
286290 }
287291
0 commit comments