File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -523,16 +523,22 @@ const hasCollectionChanged = (oldCollection, newCollection) => {
523523 for ( let i = 0 ; i < oldCollection . length ; i ++ ) {
524524 const oldVal = oldCollection [ i ] ;
525525 const newVal = newCollection [ i ] ;
526- if ( oldVal !== newVal ) return isArrayOrObject ( oldVal , newVal ) ? hasCollectionChanged ( oldVal , newVal ) : true ;
526+ if ( oldVal !== newVal ) {
527+ const hasChanged = isArrayOrObject ( oldVal , newVal ) ? hasCollectionChanged ( oldVal , newVal ) : true ;
528+ if ( hasChanged ) return true ;
529+ }
527530 }
528531 } else {
529532 if ( Object . keys ( oldCollection ) . length !== Object . keys ( newCollection ) . length ) return true ;
530533
531534 for ( const k in oldCollection ) {
532- if ( k . startsWith ( '_' ) ) return false ;
535+ if ( k . startsWith ( '_' ) ) continue ;
533536 const oldVal = oldCollection [ k ] ;
534537 const newVal = newCollection [ k ] ;
535- if ( oldVal !== newVal ) return isArrayOrObject ( oldVal , newVal ) ? hasCollectionChanged ( oldVal , newVal ) : true ;
538+ if ( oldVal !== newVal ) {
539+ const hasChanged = isArrayOrObject ( oldVal , newVal ) ? hasCollectionChanged ( oldVal , newVal ) : true ;
540+ if ( hasChanged ) return true ;
541+ }
536542 }
537543 }
538544
You can’t perform that action at this time.
0 commit comments