From 669925c78f64433399de2b4b4be45822ff9bd528 Mon Sep 17 00:00:00 2001 From: Stephen Demjanenko Date: Sun, 26 Apr 2020 20:53:56 -0700 Subject: [PATCH] Fix: make condition check height in addition to width The `if` conditional was checking the same condition twice. The code appears to intend to check both the height and width. I found this alert on LGTM.com: https://lgtm.com/projects/g/sveltejs/svelte/alerts/?mode=list --- site/scripts/get-example-thumbnails/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/scripts/get-example-thumbnails/index.js b/site/scripts/get-example-thumbnails/index.js index e5b977c6d4..770fca852f 100644 --- a/site/scripts/get-example-thumbnails/index.js +++ b/site/scripts/get-example-thumbnails/index.js @@ -45,7 +45,7 @@ async function main() { image.autocrop(); // image.scale(0.25); - if (image.bitmap.width > 200 || image.bitmap.width > 200) { + if (image.bitmap.width > 200 || image.bitmap.height > 200) { const scale = Math.min( 200 / image.bitmap.width, 200 / image.bitmap.height