From fb3aa86e1d9c6b55536b15fea659426447f5087b Mon Sep 17 00:00:00 2001 From: Arne van Iterson Date: Mon, 23 Mar 2020 18:46:34 +0100 Subject: [PATCH] Fixed issue in CanvasRenderer --- lib/renderer/CanvasRenderer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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