Skip to content

Commit

Permalink
Don't show option to change reporter type if returns aren't enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jul 26, 2023
1 parent 9b7be14 commit cfaa20b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion blocks_vertical/vertical_extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ Blockly.ScratchBlocks.VerticalExtensions.PROCEDURE_CALL_CONTEXTMENU = {
*/
customContextMenu: function(menuOptions) {
menuOptions.push(Blockly.Procedures.makeEditOption(this));
if (!this.isInFlyout && Blockly.Procedures.USER_CAN_CHANGE_CALL_TYPE) {
if (
!this.isInFlyout &&
Blockly.Procedures.USER_CAN_CHANGE_CALL_TYPE &&
this.workspace.procedureReturnsEnabled
) {
menuOptions.push(Blockly.Procedures.makeChangeTypeOption(this));
}
}
Expand Down

0 comments on commit cfaa20b

Please sign in to comment.