mirror of
https://github.com/google/blockly.git
synced 2026-01-11 19:07:08 +01:00
fix: Fix bug in IF block generators. (#8780)
This commit is contained in:
@@ -40,7 +40,11 @@ export function controls_if(block: Block, generator: PythonGenerator) {
|
||||
} while (block.getInput('IF' + n));
|
||||
|
||||
if (block.getInput('ELSE') || generator.STATEMENT_SUFFIX) {
|
||||
branchCode = generator.statementToCode(block, 'ELSE') || generator.PASS;
|
||||
if (block.getInput('ELSE')) {
|
||||
branchCode = generator.statementToCode(block, 'ELSE') || generator.PASS;
|
||||
} else {
|
||||
branchCode = generator.PASS;
|
||||
}
|
||||
if (generator.STATEMENT_SUFFIX) {
|
||||
branchCode =
|
||||
generator.prefixLines(
|
||||
|
||||
Reference in New Issue
Block a user