Skip to content

Commit 285ca74

Browse files
committed
Handle inconsistent trailing path slash
1 parent b1e8f42 commit 285ca74

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/layerchart/src/routes/docs/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import { page } from '$app/stores';
2323
import { goto } from '$app/navigation';
2424
25-
$: [path, type, name] = $page.url.pathname.match('.*/(.*)/(.*)') ?? [];
25+
$: [type, name] = $page.url.pathname.split('/').slice(2) ?? [];
2626
$: title = $page.data.meta?.title ?? name;
2727
$: pageUrl = `src/routes/docs/${type}/${name}/+page.svelte?plain=1`;
2828
$: sourceUrl = ['components', 'utils'].includes(type)

0 commit comments

Comments
 (0)