Use less ambiguous funcion

This commit is contained in:
2026-01-10 08:55:00 -06:00
parent 49dc0e3fe0
commit 241d3e799e

View File

@@ -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}`);
}