Skip to content

Commit

Permalink
Fix field colour in headless (#3795)
Browse files Browse the repository at this point in the history
  • Loading branch information
samelhusseini authored Apr 3, 2020
1 parent dfbcab7 commit 06f6c22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/field_colour.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Blockly.FieldColour.prototype.doValueUpdate_ = function(newValue) {
this.value_ = newValue;
if (this.borderRect_) {
this.borderRect_.style.fill = newValue;
} else if (this.sourceBlock_) {
} else if (this.sourceBlock_ && this.sourceBlock_.rendered) {
this.sourceBlock_.pathObject.svgPath.setAttribute('fill', newValue);
this.sourceBlock_.pathObject.svgPath.setAttribute('stroke', '#fff');
}
Expand Down

0 comments on commit 06f6c22

Please sign in to comment.