Skip to content

Commit

Permalink
bugfix/block editor/reporter blocks
Browse files Browse the repository at this point in the history
The code generated for a reporter block can't be included into a try statement.
  • Loading branch information
jolivepetrus committed Jun 20, 2018
1 parent 8f998e3 commit eb8ef16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lib/term.js
Expand Up @@ -270,6 +270,8 @@ Term.write = function(text) {
var c = '';
var prevC = '';

console.log(text);

for(var i = 0;i < text.length;i++) {
prevC = c;
c = text.charAt(i);
Expand Down
2 changes: 1 addition & 1 deletion src/library/library.js
Expand Up @@ -303,7 +303,7 @@ blockLibrary.prototype.createBlocks = function(xml, block) {
}
}

if (Blockly.Lua.developerMode) {
if (Blockly.Lua.developerMode && !b.isReporterBlock()) {
var tryCode = "";

tryCode += Blockly.Lua.indent(0,"try(") + "\n";
Expand Down

0 comments on commit eb8ef16

Please sign in to comment.