File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -360,23 +360,22 @@ export const FlowProvider: FC = ({children}) => {
360360 return
361361 }
362362
363- const flowCopy = JSON . parse ( JSON . stringify ( currentFlow ) )
364-
365- flowCopy . data . byID [ id ] = initial
366- flowCopy . meta . byID [ id ] = {
363+ currentFlow . data . byID [ id ] = initial
364+ currentFlow . meta . byID [ id ] = {
367365 title,
368366 visible : true ,
369367 }
370368
371369 if ( typeof index !== 'undefined' ) {
372- flowCopy . data . allIDs . splice ( index + 1 , 0 , id )
373- flowCopy . meta . allIDs . splice ( index + 1 , 0 , id )
370+ currentFlow . data . allIDs . splice ( index + 1 , 0 , id )
371+ currentFlow . meta . allIDs . splice ( index + 1 , 0 , id )
374372 } else {
375- flowCopy . data . allIDs . push ( id )
376- flowCopy . meta . allIDs . push ( id )
373+ currentFlow . data . allIDs . push ( id )
374+ currentFlow . meta . allIDs . push ( id )
377375 }
378376
379- update ( flowCopy )
377+ updateData ( id , { } )
378+ updateMeta ( id , { } )
380379
381380 return id
382381 }
You can’t perform that action at this time.
0 commit comments