mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Lint
This commit is contained in:
@@ -443,8 +443,8 @@ Blockly.Blocks['procedures_mutatorarg'] = {
|
||||
*/
|
||||
createNewVar_: function(newText) {
|
||||
var source = this.sourceBlock_;
|
||||
if (source && source.workspace && source.workspace.options
|
||||
&& source.workspace.options.parentWorkspace) {
|
||||
if (source && source.workspace && source.workspace.options &&
|
||||
source.workspace.options.parentWorkspace) {
|
||||
source.workspace.options.parentWorkspace.createVariable(newText);
|
||||
}
|
||||
}
|
||||
@@ -861,13 +861,13 @@ Blockly.Blocks['procedures_ifreturn'] = {
|
||||
if (block.type == 'procedures_defnoreturn' && this.hasReturnValue_) {
|
||||
this.removeInput('VALUE');
|
||||
this.appendDummyInput('VALUE')
|
||||
.appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);
|
||||
.appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);
|
||||
this.hasReturnValue_ = false;
|
||||
} else if (block.type == 'procedures_defreturn' &&
|
||||
!this.hasReturnValue_) {
|
||||
this.removeInput('VALUE');
|
||||
this.appendValueInput('VALUE')
|
||||
.appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);
|
||||
.appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);
|
||||
this.hasReturnValue_ = true;
|
||||
}
|
||||
this.setWarningText(null);
|
||||
|
||||
Reference in New Issue
Block a user