File tree Expand file tree Collapse file tree 1 file changed +28
-6
lines changed Expand file tree Collapse file tree 1 file changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -2557,14 +2557,36 @@ function diffConfig(oldConfig, newConfig) {
2557
2557
var key ;
2558
2558
2559
2559
for ( key in oldConfig ) {
2560
- if ( key !== 'edits' ) {
2561
- if ( oldConfig [ key ] !== newConfig [ key ] ) return true ;
2560
+ var oldVal = oldConfig [ key ] ;
2561
+ var newVal = newConfig [ key ] ;
2562
+ if ( oldVal !== newVal ) {
2563
+ if ( Lib . isPlainObject ( oldVal ) && Lib . isPlainObject ( newVal ) ) {
2564
+ if ( diffConfig ( oldVal , newVal ) ) {
2565
+ return true ;
2566
+ }
2567
+ }
2568
+ else if ( Array . isArray ( oldVal ) && Array . isArray ( newVal ) ) {
2569
+ if ( oldVal . length !== newVal . length ) {
2570
+ return true ;
2571
+ }
2572
+ for ( var i = 0 ; i < oldVal . length ; i ++ ) {
2573
+ if ( oldVal [ i ] !== newVal [ i ] ) {
2574
+ if ( Lib . isPlainObject ( oldVal [ i ] ) && Lib . isPlainObject ( newVal [ i ] ) ) {
2575
+ if ( diffConfig ( oldVal [ i ] , newVal [ i ] ) ) {
2576
+ return true ;
2577
+ }
2578
+ }
2579
+ else {
2580
+ return true ;
2581
+ }
2582
+ }
2583
+ }
2584
+ }
2585
+ else {
2586
+ return true ;
2587
+ }
2562
2588
}
2563
2589
}
2564
-
2565
- for ( key in oldConfig . edits ) {
2566
- if ( oldConfig . edits [ key ] !== newConfig . edits [ key ] ) return true ;
2567
- }
2568
2590
}
2569
2591
2570
2592
/**
You can’t perform that action at this time.
0 commit comments