File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/addons/addons/reorder-custom-inputs Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -100,15 +100,16 @@ export default async function ({ addon, console }) {
100100
101101 const original = procedureBlock . inputList . find ( ( input ) => input . name === inputNameToShift ) ;
102102 const originalPosition = procedureBlock . inputList . findIndex ( ( input ) => input . name === inputNameToShift ) ;
103- const itemToMove = procedureBlock . inputList . splice ( originalPosition , 1 ) [ 0 ] ;
104103
105104 if (
106105 ( newPosition == 0 && original . type === 3 /*Blockly.NEXT_STATEMENT*/ ) ||
107- ( originalPosition == 0 && itemToMove . type === 3 /*Blockly.NEXT_STATEMENT*/ )
106+ ( originalPosition == 0 && procedureBlock . inputList [ newPosition ] . type === 3 /*Blockly.NEXT_STATEMENT*/ )
108107 ) {
109108 return false
110109 }
111110
111+ const itemToMove = procedureBlock . inputList . splice ( originalPosition , 1 ) [ 0 ] ;
112+
112113 procedureBlock . inputList . splice ( newPosition , 0 , itemToMove ) ;
113114
114115 Blockly . Events . disable ( ) ;
You can’t perform that action at this time.
0 commit comments