diff --git a/apps/vdn-static/src/composables/useI18nMeta.ts b/apps/vdn-static/src/composables/useI18nMeta.ts index 1b17e40..c63dd30 100644 --- a/apps/vdn-static/src/composables/useI18nMeta.ts +++ b/apps/vdn-static/src/composables/useI18nMeta.ts @@ -2,7 +2,7 @@ import { computed, type ComputedRef, type Ref, unref, watch } from 'vue' import { useRoute } from 'vue-router' import { useMeta, type MetaConfig, type LocaleAwareMeta } from './useMeta' import { useLocale, type LocaleId } from '../i18n' -import type { RouteMeta, RouteMetaValue } from '../types/route-meta.d' +import type { RouteMetaValue } from '../types/route-meta.d' /** * Composable for i18n-aware meta tag management @@ -49,7 +49,7 @@ export function useI18nMeta( routeValue: typeof route ): T | undefined => { if (value === undefined) return undefined - return typeof value === 'function' ? value(routeValue) : value + return typeof value === 'function' ? (value as Function)(routeValue) as T : value } /** @@ -158,10 +158,10 @@ function resolveI18nCustomTags( return customTags.map(tag => ({ ...tag, - content: typeof tag.content === 'string' && typeof tag.content === 'object' - ? resolveI18nContent(tag.content as any, currentLocale) || '' - : typeof tag.content === 'function' - ? tag.content + content: typeof tag.content === 'function' + ? '' + : typeof tag.content === 'object' + ? resolveI18nContent(tag.content as any, currentLocale) || '' : tag.content })) }