@@ -624,8 +624,8 @@ const reducer = (state: State, action: Action) => {
624
624
if ( state . components [ focusIndex ] . past . length === 0 ) return { ...state } ;
625
625
//the children array of the focused component will equal the last element of the past array
626
626
state . components [ focusIndex ] . children = state . components [ focusIndex ] . past [ state . components [ focusIndex ] . past . length - 1 ]
627
- //the last element of the future array gets pushed into the past
628
- //the last element of the future array gets popped out
627
+ //the last element of the past array gets pushed into the future
628
+ //the last element of the past array gets popped out
629
629
state . components [ focusIndex ] . future . push ( state . components [ focusIndex ] . past . pop ( ) )
630
630
631
631
@@ -636,6 +636,7 @@ const reducer = (state: State, action: Action) => {
636
636
// state.components[focusIndex].children = state.past[state.past.length-1];
637
637
// //the last element of past array gets pushed into future;
638
638
// state.future.push(state.past.pop());
639
+
639
640
//generate code for the Code Preview
640
641
state . components . forEach ( ( el , i ) => {
641
642
el . code = generateCode (
@@ -668,6 +669,7 @@ const reducer = (state: State, action: Action) => {
668
669
// state.components[focusIndex].children = state.future[state.future.length - 1];
669
670
// //the last element of the future array gets pushed into the past array and the last element of the future array gets popped off
670
671
// state.past.push(state.future.pop());
672
+
671
673
// //generate code for the Code Preview
672
674
state . components . forEach ( ( el , i ) => {
673
675
el . code = generateCode (
0 commit comments