Skip to content

Commit 0f59800

Browse files
Paths on windows (#5036)
* add loading indicator to sidebar links * replace backslashes with slashes * bumping DISK_CACHE_BREAKER * using replace instead or replaceAll
1 parent 25171aa commit 0f59800

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beta/src/pages/[[...markdownPath]].js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function reviveNodeOnClient(key, val) {
5555

5656
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5757
// ~~~~ IMPORTANT: BUMP THIS IF YOU CHANGE ANY CODE BELOW ~~~
58-
const DISK_CACHE_BREAKER = 2;
58+
const DISK_CACHE_BREAKER = 3;
5959
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6060

6161
// Put MDX output into JSON for client.
@@ -207,7 +207,7 @@ export async function getStaticPaths() {
207207
// 'foo/bar/baz.md' -> ['foo', 'bar', 'baz']
208208
// 'foo/bar/qux/index.md' -> ['foo', 'bar', 'qux']
209209
function getSegments(file) {
210-
let segments = file.slice(0, -3).split('/');
210+
let segments = file.slice(0, -3).replace(/\\/g, '/').split('/');
211211
if (segments[segments.length - 1] === 'index') {
212212
segments.pop();
213213
}

0 commit comments

Comments
 (0)