From 6d758f338bd7af3de00661ab867b5697861049b6 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Thu, 23 Jan 2025 22:33:14 +0800 Subject: [PATCH] code refactor --- src/locales/helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/helpers.ts b/src/locales/helpers.ts index 7c7b71f8..85ff229c 100644 --- a/src/locales/helpers.ts +++ b/src/locales/helpers.ts @@ -497,9 +497,9 @@ export function useI18n() { } // public functions - function translateIf(text: string | undefined, isTranslate: boolean): string | undefined { + function translateIf(text: string | undefined, isTranslate?: boolean): string { if (!isDefined(text)) { - return undefined; + return ''; } if (isTranslate) {