Skip to content

Commit

Permalink
Fixes bug with revalidating pages that only revalidates locales and n…
Browse files Browse the repository at this point in the history
…ot en (#600)
  • Loading branch information
Lukasdotcom authored Oct 25, 2023
1 parent e560e13 commit cfcec4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/api/revalidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const pages = [
"/error/update",
"/404",
"/download",
"/",
"/privacy",
"/signin",
"/signup",
Expand Down Expand Up @@ -74,10 +73,11 @@ async function revalidate(page: string, res: NextApiResponse): Promise<void> {
await res.revalidate("/" + locale + page);
console.log("Revalidated the page " + "/" + locale + page);
}),
async () => {
new Promise<void>(async (resolve) => {
console.log("Revalidating the page " + page);
await res.revalidate(page);
console.log("Revalidated the page " + page);
},
resolve();
}),
]);
}

0 comments on commit cfcec4a

Please sign in to comment.