Fix outdated error message in paginate() function (#6124)
* Update paginate.ts * Create gorgeous-mails-sniff.md
This commit is contained in:
parent
4f150e80b1
commit
f20a85b642
2 changed files with 6 additions and 1 deletions
5
.changeset/gorgeous-mails-sniff.md
Normal file
5
.changeset/gorgeous-mails-sniff.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Fix outdated error message in `paginate()` function.
|
|
@ -24,7 +24,7 @@ export function generatePaginateFunction(routeMatch: RouteData): PaginateFunctio
|
|||
includesFirstPageNumber = true;
|
||||
} else {
|
||||
throw new Error(
|
||||
`[paginate()] page number param \`${paramName}\` not found in your filepath.\nRename your file to \`[...page].astro\` or customize the param name via the \`paginate([], {param: '...'}\` option.`
|
||||
`[paginate()] page number param \`${paramName}\` not found in your filepath.\nRename your file to \`[page].astro\` or \`[...page].astro\`.`
|
||||
);
|
||||
}
|
||||
const lastPage = Math.max(1, Math.ceil(data.length / pageSize));
|
||||
|
|
Loading…
Reference in a new issue