File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments