Skip to content

Commit 6968389

Browse files
committed
fix: normalize rate limit parsing
1 parent 28c5dc8 commit 6968389

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/start.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ export const start = defineCommand({
247247
},
248248
},
249249
run({ args }) {
250-
const rateLimitRaw = args["rate-limit"]
250+
const parsedRateLimit = Number.parseInt(args["rate-limit"], 10)
251251
const rateLimit =
252-
rateLimitRaw === undefined ? undefined : Number.parseInt(rateLimitRaw, 10)
252+
Number.isNaN(parsedRateLimit) ? undefined : parsedRateLimit
253253

254254
return runServer({
255255
port: Number.parseInt(args.port, 10),

0 commit comments

Comments
 (0)