fix warnings

This commit is contained in:
Mario
2020-09-16 15:50:55 +02:00
parent bbd14c58b5
commit 6a4de9c7a2
4 changed files with 12 additions and 11 deletions
+2 -2
View File
@@ -331,7 +331,7 @@ Blockly.Blocks['switch_case'] = {
}
break;
default:
throw 'Unknown block type.';
throw new Error('Unknown block type.');
}
caseBlock = caseBlock.nextConnection &&
caseBlock.nextConnection.targetBlock();
@@ -355,7 +355,7 @@ Blockly.Blocks['switch_case'] = {
caseBlock.satementConnection_ = defaultInput && defaultInput.connection.targetConnection;
break;
default:
throw 'Unknown block type';
throw new Error('Unknown block type');
}
caseBlock = caseBlock.nextConnection &&
caseBlock.nextConnection.targetBlock();
+1 -1
View File
@@ -64,7 +64,7 @@ Blockly.Blocks['sensebox_sd_write_file'] = {
// Is the block nested in a loop?
var block = this;
do {
if (this.LOOP_TYPES.indexOf(block.type) != -1) {
if (this.LOOP_TYPES.indexOf(block.type) !== -1) {
legal = true;
break;
}