From 7225199debff83ba2dd2839372a928ebe8070dbf Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Wed, 16 Feb 2022 20:31:15 +0100 Subject: [PATCH] Fixed typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was late when I typed this 😆 --- .github/workflows/image-minimizer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-minimizer.js b/.github/workflows/image-minimizer.js index 273c6d328..80cc5294c 100644 --- a/.github/workflows/image-minimizer.js +++ b/.github/workflows/image-minimizer.js @@ -8,8 +8,8 @@ module.exports = async ({github, context}) => { const IMG_MAX_HEIGHT_PX = 600; // maximum width of GitHub issues/comments const IMG_MAX_WIDTH_PX = 800; - // all images that have a lower aspect ration (-> have a smaller width) than this will be minimized - const MIN_ASPECT_RATION = IMG_MAX_WIDTH_PX / IMG_MAX_HEIGHT_PX + // all images that have a lower aspect ratio (-> have a smaller width) than this will be minimized + const MIN_ASPECT_RATIO = IMG_MAX_WIDTH_PX / IMG_MAX_HEIGHT_PX // Get the body of the image let initialBody = null; @@ -76,7 +76,7 @@ module.exports = async ({github, context}) => { } console.log(`Probing resulted in ${probeResult.width}x${probeResult.height}px`); - shouldModify = probeResult.height > IMG_MAX_HEIGHT_PX && (probeResult.width / probeResult.height) < MIN_ASPECT_RATION; + shouldModify = probeResult.height > IMG_MAX_HEIGHT_PX && (probeResult.width / probeResult.height) < MIN_ASPECT_RATIO; } catch(e) { console.log('Probing failed:', e); // Immediately abort