diff --git a/frontend/src/lib/prefetchers.ts b/frontend/src/lib/prefetchers.ts index a91c46d..6ccb2b9 100644 --- a/frontend/src/lib/prefetchers.ts +++ b/frontend/src/lib/prefetchers.ts @@ -67,12 +67,12 @@ const prefetchPostChanges: Prefetcher = async (qc, url) => { export const routePrefetchers: { test: (u: URL) => boolean; run: Prefetcher }[] = [ { test: u => u.pathname === '/' || u.pathname === '/posts', run: prefetchPostsIndex }, - { test: u => (['/posts/new', '/posts/changes'].includes (u.pathname) + { test: u => (!(['/posts/new', '/posts/changes'].includes (u.pathname)) && Boolean (mPost (u.pathname))), run: prefetchPostShow }, { test: u => u.pathname === '/posts/changes', run: prefetchPostChanges }, { test: u => u.pathname === '/wiki', run: prefetchWikiPagesIndex }, - { test: u => (['/wiki/new', '/wiki/changes'].includes (u.pathname) + { test: u => (!(['/wiki/new', '/wiki/changes'].includes (u.pathname)) && Boolean (mWiki (u.pathname))), run: prefetchWikiPageShow }, ]