Skip to content

Commit e84c684

Browse files
committed
命令ブロックが1つもない場合にendの前にインデントが出力される不具合の修正
1 parent 3a8ad20 commit e84c684

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/ruby-generator/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ export default function (Blockly) {
369369
}
370370

371371
if (this.editingTarget) {
372-
code = `${this.spriteNew(this.editingTarget)} do\n${this.prefixLines(code, this.INDENT)}end`;
372+
const body = code ? this.prefixLines(code, this.INDENT) : '';
373+
code = `${this.spriteNew(this.editingTarget)} do\n${body}end`;
373374
}
374375

375376
return allDefs + code;

0 commit comments

Comments
 (0)