Skip to content

Commit

Permalink
properly detect invalid image dimensions passed to the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
stuffmatic committed Dec 23, 2018
1 parent 17b5cde commit ca86836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class CLI {
const imageWidth = parseFloat(imageWidthString)
const imageHeight = parseFloat(imageHeightString)

if (imageWidth == undefined || imageHeight == undefined) {
if (isNaN(imageWidth) || isNaN(imageHeight)) {
console.log('Error: got invalid image dimensions')
return
}
Expand Down

0 comments on commit ca86836

Please sign in to comment.