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<
641641 produce ( ( state ) => {
642642 // FIXME I need to modify many pods here.
643643 if ( state . pods [ id ] ?. parent === parent ) return ;
644+ const oldparent = state . pods [ state . pods [ id ] . parent ] ;
644645 state . pods [ id ] . parent = parent ;
645646 // FXME I'm marking all the pods as dirty here.
646647 state . pods [ id ] . dirty = true ;
647648 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 ) ;
657651 } )
658652 ) ,
659653 resizeScopeSize : ( { id } ) =>
You can’t perform that action at this time.
0 commit comments