diff --git a/app/store/prompt.ts b/app/store/prompt.ts index a25cda581..92ff8b370 100644 --- a/app/store/prompt.ts +++ b/app/store/prompt.ts @@ -154,10 +154,10 @@ export const usePromptStore = createPersistStore( fetch(PROMPT_URL) .then((res) => res.json()) .then((res) => { - let fetchPrompts = [res.en, res.tw, res.cn]; - if (getLang() === "cn") { - fetchPrompts = fetchPrompts.reverse(); - } + const lang = getLang(); + const fetchPrompts = [res[lang], res.en, res.tw, res.cn].filter( + Boolean, + ); const builtinPrompts = fetchPrompts.map((promptList: PromptList) => { return promptList.map( ([title, content]) =>