File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -641,19 +641,13 @@ const createRepoSlice: StateCreator<
641
641
produce ( ( state ) => {
642
642
// FIXME I need to modify many pods here.
643
643
if ( state . pods [ id ] ?. parent === parent ) return ;
644
+ const oldparent = state . pods [ state . pods [ id ] . parent ] ;
644
645
state . pods [ id ] . parent = parent ;
645
646
// FXME I'm marking all the pods as dirty here.
646
647
state . pods [ id ] . dirty = true ;
647
648
state . pods [ parent ] . children . push ( state . pods [ id ] ) ;
648
- const oldparent = state . pods [ state . pods [ id ] . parent ] ;
649
- if ( oldparent ) {
650
- let idx = oldparent . children . findIndex ( ( _id ) => _id === id ) ;
651
- if ( idx >= 0 ) {
652
- oldparent . children . splice ( idx , 1 ) ;
653
- oldparent . dirty = true ;
654
- }
655
- }
656
- // return [id, parent, oldparent];
649
+ let idx = oldparent . children . findIndex ( ( { id : _id } ) => _id === id ) ;
650
+ oldparent . children . splice ( idx , 1 ) ;
657
651
} )
658
652
) ,
659
653
resizeScopeSize : ( { id } ) =>
You can’t perform that action at this time.
0 commit comments