diff --git a/core/block_render_svg.js b/core/block_render_svg.js index 6275d1aec..53719b8e3 100644 --- a/core/block_render_svg.js +++ b/core/block_render_svg.js @@ -567,7 +567,7 @@ Blockly.BlockSvg.prototype.renderDraw_ = function(iconWidth, inputRows) { this.squareTopLeftCorner_ = true; this.squareBottomLeftCorner_ = true; } else { - var renderCap = typeof this.hat !== undefined ? this.hat === 'cap' : + var renderCap = this.hat ? this.hat === 'cap' : Blockly.BlockSvg.START_HAT; this.squareTopLeftCorner_ = false;