Skip to content

Commit 7877bec

Browse files
committed
fix branch procedure prototype accepting blocks
1 parent a92e959 commit 7877bec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

blocks_vertical/procedures.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Blockly.ScratchBlocks.ProcedureUtils.createAllInputs_ = function(connectionMap)
314314
labelText = component.substring(2).trim();
315315

316316
if (argumentType == 'c') {
317-
var input = this.appendStatementInput(id)
317+
var input = this.appendStatementInput(id).setCheck(this.type == 'procedures_prototype' ? "argumentReporterCommand" : "normal");
318318
} else {
319319
var input = this.appendValueInput(id);
320320
}
@@ -496,6 +496,10 @@ Blockly.ScratchBlocks.ProcedureUtils.createArgumentReporter_ = function(
496496
newBlock.initSvg();
497497
newBlock.render(false);
498498
}
499+
if (argumentType === 'c') {
500+
newBlock.setPreviousStatement(true, 'argumentReporterCommand')
501+
newBlock.setNextStatement(true, 'argumentReporterCommand')
502+
}
499503
} finally {
500504
Blockly.Events.enable();
501505
}

0 commit comments

Comments
 (0)