diff --git a/.changeset/gorgeous-mails-sniff.md b/.changeset/gorgeous-mails-sniff.md new file mode 100644 index 000000000..32986063a --- /dev/null +++ b/.changeset/gorgeous-mails-sniff.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fix outdated error message in `paginate()` function. diff --git a/packages/astro/src/core/render/paginate.ts b/packages/astro/src/core/render/paginate.ts index f9da47a26..7bb5eca77 100644 --- a/packages/astro/src/core/render/paginate.ts +++ b/packages/astro/src/core/render/paginate.ts @@ -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));