Skip to content

Commit

Permalink
🐛 fix: fix changelog locale not showing English (lobehub#5607)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored and gecsp committed Jan 28, 2025
1 parent e61226b commit 20f1eee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/services/changelog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ChangelogService {
try {
const post = await this.getIndexItemById(id);

const filename = options?.locale === 'en-US' ? `${id}.mdx` : `${id}.zh-CN.mdx`;
const filename = options?.locale?.startsWith('zh') ? `${id}.zh-CN.mdx` : `${id}.mdx`;
const url = this.genUrl(urlJoin(this.config.docsPath, filename));

const response = await fetch(url);
Expand Down

0 comments on commit 20f1eee

Please sign in to comment.