Skip to content

Commit 4bfafde

Browse files
authored
Simplify text color handling in dropdown
Remove redundant text color assignment for dropdown.
1 parent 7c2b046 commit 4bfafde

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

core/field_dropdown.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,12 @@ Blockly.FieldDropdown.prototype.init = function() {
154154
}
155155

156156
// Force a reset of the text to add the arrow.
157+
if (this.sourceBlock_.textColour) {
158+
this.textColour = this.sourceBlock_.textColour;
159+
}
157160
var text = this.text_;
158161
this.text_ = null;
159162
this.setText(text);
160-
161-
if (this.sourceBlock_.textColour) {
162-
this.textElement_.style.setProperty(
163-
"fill",
164-
this.sourceBlock_.textColour,
165-
"important"
166-
);
167-
}
168163
};
169164

170165
/**

0 commit comments

Comments
 (0)