solve compiling warnings

This commit is contained in:
Mario
2020-07-31 11:27:53 +02:00
parent 440622a66c
commit 4e2b25947d
18 changed files with 76 additions and 83 deletions
@@ -1,5 +1,5 @@
import * as Blockly from 'blockly/core';
import { Block } from 'blockly';
/**
* Code generator to add code into the setup() and loop() functions.
@@ -13,7 +13,7 @@ Blockly.Arduino['arduino_functions'] = function (block) {
var targetBlock = block.getInputTargetBlock(name);
var code = Blockly.Arduino.blockToCode(targetBlock);
if (typeof code != 'string') {
throw 'Expecting code from statement block "' + targetBlock.type + '".';
throw new Error('Expecting code from statement block "' + targetBlock.type + '".');
}
return code;
}