Skip to content

Commit 4b3fa7e

Browse files
committed
fix: correct the link to edit this page on index files (#238)
1 parent aa20826 commit 4b3fa7e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

api/src/utils/bundle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export class Bundle {
115115
throw new BundleError(404, "Couldn't find file", 'FILE_NOT_FOUND');
116116
}
117117
this.markdown = githubContents.md;
118+
this.path = githubContents.path;
118119
this.contentFetched = true;
119120
}
120121

api/src/utils/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ export function formatConfigLocales(configFiles: Configs, path: string): OutputC
155155
) {
156156
// TODO: edge cases of bad configs, e.g what if locales is not an array?
157157

158-
const defaulLocale = config.locales[0];
158+
const defaultLocale = config.locales[0];
159159

160-
const currentLocale = path.split('/')[0] || defaulLocale;
160+
const currentLocale = path.split('/')[0] || defaultLocale;
161161

162162
const sidebar = (getValue(config, 'sidebar') as Record<string, unknown>)[currentLocale];
163163

0 commit comments

Comments
 (0)