Core: Fix source.getPageByHref() return no result without explicit language

This commit is contained in:
Fuma Nama
2025-09-18 21:38:24 +08:00
parent d9a3cea714
commit 982aed6c21
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-core': patch
---
Fix `source.getPageByHref()` return no result without explicit `language`
@@ -44,4 +44,4 @@ return (
[My Link](./file.mdx)
```
[Example: `../feedback.mdx`](../feedback.mdx)
[Example: `../../feedback.mdx`](../../feedback.mdx)
+1 -1
View File
@@ -375,7 +375,7 @@ function createOutput(options: LoaderOptions): LoaderOutput<LoaderConfig> {
};
}
},
getPageByHref(href, { dir = '', language } = {}) {
getPageByHref(href, { dir = '', language = defaultLanguage } = {}) {
const [value, hash] = href.split('#', 2);
let target;