diff --git a/src/cli/cli.ts b/src/cli/cli.ts index da0bfb8..64bc094 100644 --- a/src/cli/cli.ts +++ b/src/cli/cli.ts @@ -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 }