diff --git a/express/cli.ts b/express/cli.ts index e161360..b9dbed4 100644 --- a/express/cli.ts +++ b/express/cli.ts @@ -30,7 +30,7 @@ function parseListenAddress(listen: string | undefined): { if (lastColon === -1) { // Just a port number const port = parseInt(listen, 10); - if (isNaN(port)) { + if (Number.isNaN(port)) { throw new Error(`Invalid listen address: ${listen}`); } return { host: defaultHost, port }; @@ -39,7 +39,7 @@ function parseListenAddress(listen: string | undefined): { const host = listen.slice(0, lastColon); const port = parseInt(listen.slice(lastColon + 1), 10); - if (isNaN(port)) { + if (Number.isNaN(port)) { throw new Error(`Invalid port in listen address: ${listen}`); }