Skip to content

Commit

Permalink
fix: use non-deprecated input type constants (scratchfoundation#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
gonfunko authored May 17, 2024
1 parent cb5b068 commit 1f1c859
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blocks_vertical/procedures.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,9 @@ function updateDeclarationProcCode_() {
this.procCode_ += ' ';
}
var input = this.inputList[i];
if (input.type == Blockly.DUMMY_INPUT) {
if (input.type == Blockly.inputs.inputTypes.DUMMY) {
this.procCode_ += input.fieldRow[0].getValue();
} else if (input.type == Blockly.INPUT_VALUE) {
} else if (input.type == Blockly.inputs.inputTypes.VALUE) {
// Inspect the argument editor.
var target = input.connection.targetBlock();
this.displayNames_.push(target.getFieldValue('TEXT'));
Expand All @@ -587,9 +587,9 @@ function updateDeclarationProcCode_() {
function focusLastEditor_() {
if (this.inputList.length > 0) {
var newInput = this.inputList[this.inputList.length - 1];
if (newInput.type == Blockly.DUMMY_INPUT) {
if (newInput.type == Blockly.inputs.inputTypes.DUMMY) {
newInput.fieldRow[0].showEditor_();
} else if (newInput.type == Blockly.INPUT_VALUE) {
} else if (newInput.type == Blockly.inputs.inputTypes.VALUE) {
// Inspect the argument editor.
var target = newInput.connection.targetBlock();
target.getField('TEXT').showEditor_();
Expand Down

0 comments on commit 1f1c859

Please sign in to comment.