Skip to content

Commit

Permalink
#612: fixed parsing the body limit value
Browse files Browse the repository at this point in the history
  • Loading branch information
petermasking committed Feb 6, 2025
1 parent 0c7b437 commit ecc387b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/cli/src/commands/StartServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,10 @@ export default class StartServer implements Command
return logLevelParser.parse(logLevel);
}

#parseBodyLimit(bodyLimit: string | undefined): number | undefined
#parseBodyLimit(bodyLimitString: string | undefined): number | undefined
{
if (Number.isInteger(bodyLimit) === false)
{
return undefined;
}
const bodyLimit = Number.parseInt(bodyLimitString as string);

return Number.parseInt(bodyLimit as string);
return Number.isNaN(bodyLimit) ? undefined : bodyLimit;
}
}

0 comments on commit ecc387b

Please sign in to comment.