From 05ca4ce4b189a6d68132903a7743658949fb58f5 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Fri, 14 Sep 2018 01:39:24 +0000 Subject: [PATCH] fix --- commands/image-edit/demotivational-poster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/image-edit/demotivational-poster.js b/commands/image-edit/demotivational-poster.js index 3d52e175..35d59744 100644 --- a/commands/image-edit/demotivational-poster.js +++ b/commands/image-edit/demotivational-poster.js @@ -51,7 +51,7 @@ module.exports = class DemotivationalPosterCommand extends Command { ctx.fillStyle = 'black'; ctx.fillRect(0, 0, canvas.width, canvas.height); const ratio = data.width / data.height; - const widthHigher = width >= height; + const widthHigher = data.width >= data.height; const width = widthHigher ? 602 : Math.min(Math.round(402 / ratio), 602); const height = widthHigher ? Math.min(Math.round(602 * ratio), 402) : 402; const x = (canvas.width / 2) - (width / 2);