File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -305,14 +305,13 @@ export class Utils {
305305 static removeInternalAndSame ( a : unknown , b : unknown ) :void {
306306 if ( typeof a !== 'object' || typeof b !== 'object' ) return ;
307307 for ( let key in a ) {
308- let val = a [ key ] ;
309- if ( key [ 0 ] === '_' || val === b [ key ] ) {
308+ const aVal = a [ key ] ;
309+ const bVal = b [ key ] ;
310+ if ( key [ 0 ] === '_' || aVal === bVal ) {
310311 delete a [ key ]
311- } else if ( val && typeof val === 'object' && b [ key ] !== undefined ) {
312- for ( let i in val ) {
313- if ( val [ i ] === b [ key ] [ i ] || i [ 0 ] === '_' ) { delete val [ i ] }
314- }
315- if ( ! Object . keys ( val ) . length ) { delete a [ key ] }
312+ } else if ( aVal && typeof aVal === 'object' && bVal !== undefined ) {
313+ Utils . removeInternalAndSame ( aVal , bVal ) ;
314+ if ( ! Object . keys ( aVal ) . length ) { delete a [ key ] }
316315 }
317316 }
318317 }
You can’t perform that action at this time.
0 commit comments