Fix advanced compilation tests for Q1 2021 release (#4709)

This commit is contained in:
alschmiedt
2021-03-17 15:46:17 -07:00
committed by GitHub
parent c6b8791ece
commit 9a93ca486f
4 changed files with 56 additions and 6 deletions

View File

@@ -21,7 +21,6 @@ goog.require('Blockly.inputTypes');
goog.requireType('Blockly.Block');
goog.requireType('Blockly.BlockSvg');
goog.requireType('Blockly.Field');
goog.requireType('Blockly.FieldDropdown');
goog.requireType('Blockly.RenderedConnection');
@@ -122,17 +121,16 @@ Blockly.Input.prototype.insertFieldAt = function(index, field, opt_name) {
field.name = opt_name;
field.setVisible(this.isVisible());
var fieldDropdown = /** @type {Blockly.FieldDropdown} */ (field);
if (fieldDropdown.prefixField) {
if (field.prefixField) {
// Add any prefix.
index = this.insertFieldAt(index, fieldDropdown.prefixField);
index = this.insertFieldAt(index, field.prefixField);
}
// Add the field to the field row.
this.fieldRow.splice(index, 0, field);
++index;
if (fieldDropdown.suffixField) {
if (field.suffixField) {
// Add any suffix.
index = this.insertFieldAt(index, fieldDropdown.suffixField);
index = this.insertFieldAt(index, field.suffixField);
}
if (this.sourceBlock_.rendered) {