mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-07-02 04:41:48 +08:00
fix: scheduled task cleanup error - upgrade to v1.2.1 (#816)
fix: scheduled task cleanup error "e.get is not a function" - Use optional chaining in i18n.getMessagesbyContext to safely access Context methods - Update version to v1.2.1 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ export default {
|
||||
getMessagesbyContext: (
|
||||
c: Context<HonoCustomType>
|
||||
): LocaleMessages => {
|
||||
const locale = c.get("lang") || c.env.DEFAULT_LANG;
|
||||
const locale = c?.get?.("lang") || c.env?.DEFAULT_LANG;
|
||||
// multi-language support
|
||||
if (locale === "en") return en;
|
||||
if (locale === "zh") return zh;
|
||||
|
||||
Reference in New Issue
Block a user