Skip to content

Commit

Permalink
fix: case for home page/index page
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 authored and brc-dd committed Dec 21, 2022
1 parent 40db044 commit 3c64778
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client/app/utils.ts
Expand Up @@ -28,6 +28,12 @@ export function pathToFile(path: string): string {
pagePath = pagePath.slice(0, -1)
}

// if we removed the trailing slash and have an empty page path
// we are trying to render the index/home page...
if (pagePath.length === 0) {
pagePath = '/index'
}

if (import.meta.env.DEV) {
// always force re-fetch content in dev
pagePath += `.md?t=${Date.now()}`
Expand Down

0 comments on commit 3c64778

Please sign in to comment.