Skip to content

Commit ab388cc

Browse files
committed
Merge remote-tracking branch 'origin/fix_finish' into develop
2 parents 3a8ad20 + e84c684 commit ab388cc

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)