Skip to content

Commit

Permalink
fix null/NaN block limit
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed Apr 1, 2024
1 parent b073dd7 commit 76846db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bitcore-node/src/routes/api/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ router.get('/', async function(req: Request, res: Response) {
let { chain, network } = req.params;
let { sinceBlock, date, limit, since, direction, paging } = req.query as any;
if (limit) {
limit = parseInt(limit);
limit = parseInt(limit) || undefined; // if limit is NaN or null, set it to undefined so it'll fallback to CSP default
}
try {
let payload = {
Expand Down

0 comments on commit 76846db

Please sign in to comment.