diff options
author | 2023-02-03 15:34:09 -0800 | |
---|---|---|
committer | 2023-02-03 17:34:09 -0600 | |
commit | f20a85b642994f240d8c94260fc55ffa1fd14294 (patch) | |
tree | 8b93ffbfb2959b73195672bef618e0d60d537f72 | |
parent | 4f150e80b1eede998efdfd5973a780d7fd5ce3b6 (diff) | |
download | astro-f20a85b642994f240d8c94260fc55ffa1fd14294.tar.gz astro-f20a85b642994f240d8c94260fc55ffa1fd14294.tar.zst astro-f20a85b642994f240d8c94260fc55ffa1fd14294.zip |
Fix outdated error message in paginate() function (#6124)
* Update paginate.ts
* Create gorgeous-mails-sniff.md
-rw-r--r-- | .changeset/gorgeous-mails-sniff.md | 5 | ||||
-rw-r--r-- | packages/astro/src/core/render/paginate.ts | 2 |
2 files changed, 6 insertions, 1 deletions
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)); |