Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/src/utils/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export class Bundle {
throw new BundleError(404, "Couldn't find file", 'FILE_NOT_FOUND');
}
this.markdown = githubContents.md;
this.path = githubContents.path;
this.contentFetched = true;
}

Expand Down
4 changes: 2 additions & 2 deletions api/src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ export function formatConfigLocales(configFiles: Configs, path: string): OutputC
) {
// TODO: edge cases of bad configs, e.g what if locales is not an array?

const defaulLocale = config.locales[0];
const defaultLocale = config.locales[0];

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

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

Expand Down