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