diff --git a/src/routes/[slug]/+page.server.js b/src/routes/[slug]/+page.server.js index 90ef6cb..d9c9bc0 100644 --- a/src/routes/[slug]/+page.server.js +++ b/src/routes/[slug]/+page.server.js @@ -4,7 +4,7 @@ import { postData } from '../_posts/all.js'; export function load({ params }) { const i = postData.findIndex(p => p.slug === params.slug); return { - prev: i > 0 ? postData[i - 1].slug : null, - next: i < postData.length - 1 ? postData[i + 1].slug : null, + prev: i < postData.length - 1 ? postData[i + 1].slug : null, + next: i > 0 ? postData[i - 1].slug : null, }; -} \ No newline at end of file +}