diff --git a/core/field_colour.js b/core/field_colour.js index 6cf82d089..562bdaeec 100644 --- a/core/field_colour.js +++ b/core/field_colour.js @@ -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'); }