diff --git a/sites/svelte.dev/src/routes/docs/+layout.server.js b/sites/svelte.dev/src/routes/docs/+layout.server.js index 543bcd3488..c7bfa54e70 100644 --- a/sites/svelte.dev/src/routes/docs/+layout.server.js +++ b/sites/svelte.dev/src/routes/docs/+layout.server.js @@ -1,17 +1,15 @@ export const prerender = true; export async function load({ url }) { - const is_docs_index = url.pathname === '/docs'; - - if (!is_docs_index) { - const { get_docs_data, get_docs_list } = await import('$lib/server/docs/index.js'); - + if (url.pathname === '/docs') { return { - sections: url.pathname === '/docs' ? [] : get_docs_list(get_docs_data()) + sections: [] }; } + const { get_docs_data, get_docs_list } = await import('$lib/server/docs/index.js'); + return { - sections: [] + sections: get_docs_list(get_docs_data()) }; }