Handle undefined colour (#3997)

This commit is contained in:
Monica Kozbial
2020-06-29 10:47:24 -07:00
committed by GitHub
parent 14c7854966
commit bd887665b8

View File

@@ -588,7 +588,7 @@ Blockly.Toolbox.prototype.setColour_ = function(colourValue, childOut,
// Decode the colour for any potential message references
// (eg. `%{BKY_MATH_HUE}`).
var colour = Blockly.utils.replaceMessageReferences(colourValue);
if (colour === null || colour === '') {
if (colour == null || colour === '') {
// No attribute. No colour.
childOut.hexColour = '';
} else {