We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 789da45 commit 9104242Copy full SHA for 9104242
src/server/services/changelog/index.ts
@@ -76,7 +76,7 @@ export class ChangelogService {
76
try {
77
const post = await this.getIndexItemById(id);
78
79
- const filename = options?.locale === 'en-US' ? `${id}.mdx` : `${id}.zh-CN.mdx`;
+ const filename = options?.locale?.startsWith('zh') ? `${id}.zh-CN.mdx` : `${id}.mdx`;
80
const url = this.genUrl(urlJoin(this.config.docsPath, filename));
81
82
const response = await fetch(url);
0 commit comments