Skip to content

Commit 7225199

Browse files
authored
Fixed typo
It was late when I typed this 😆
1 parent c08a4e8 commit 7225199

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/image-minimizer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module.exports = async ({github, context}) => {
88
const IMG_MAX_HEIGHT_PX = 600;
99
// maximum width of GitHub issues/comments
1010
const IMG_MAX_WIDTH_PX = 800;
11-
// all images that have a lower aspect ration (-> have a smaller width) than this will be minimized
12-
const MIN_ASPECT_RATION = IMG_MAX_WIDTH_PX / IMG_MAX_HEIGHT_PX
11+
// all images that have a lower aspect ratio (-> have a smaller width) than this will be minimized
12+
const MIN_ASPECT_RATIO = IMG_MAX_WIDTH_PX / IMG_MAX_HEIGHT_PX
1313

1414
// Get the body of the image
1515
let initialBody = null;
@@ -76,7 +76,7 @@ module.exports = async ({github, context}) => {
7676
}
7777
console.log(`Probing resulted in ${probeResult.width}x${probeResult.height}px`);
7878

79-
shouldModify = probeResult.height > IMG_MAX_HEIGHT_PX && (probeResult.width / probeResult.height) < MIN_ASPECT_RATION;
79+
shouldModify = probeResult.height > IMG_MAX_HEIGHT_PX && (probeResult.width / probeResult.height) < MIN_ASPECT_RATIO;
8080
} catch(e) {
8181
console.log('Probing failed:', e);
8282
// Immediately abort

0 commit comments

Comments
 (0)