fix warnings
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user