diff --git a/lib/renderer/CanvasRenderer.js b/lib/renderer/CanvasRenderer.js index eea56d5..9f22141 100644 --- a/lib/renderer/CanvasRenderer.js +++ b/lib/renderer/CanvasRenderer.js @@ -76,12 +76,12 @@ class CanvasRenderer { 0, 0, child.width, child.height ); - } else if (child.style && child.w && child.h) { - ctx.fillStyle = child.style.fill; - ctx.fillRect(0, 0, child.w, child.h); } else { ctx.drawImage(img, 0, 0); } + } else if (child.style && child.w && child.h) { + ctx.fillStyle = child.style.fill; + ctx.fillRect(0, 0, child.w, child.h); } // Handle children with children