From 0f1bc2258a9a10653f86a234f4c30acf94b7ecb8 Mon Sep 17 00:00:00 2001 From: BarnacleBoy Date: Mon, 18 May 2026 12:43:04 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20useRouteMeta=20=E2=80=94=20fix=20RouteMe?= =?UTF-8?q?ta=20import=20and=20callable=20type=20narrowing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/vdn-static/src/composables/useRouteMeta.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/vdn-static/src/composables/useRouteMeta.ts b/apps/vdn-static/src/composables/useRouteMeta.ts index 2b7e3ec..d530137 100644 --- a/apps/vdn-static/src/composables/useRouteMeta.ts +++ b/apps/vdn-static/src/composables/useRouteMeta.ts @@ -1,7 +1,8 @@ import { watch, onMounted, onUnmounted, type Ref, computed, unref } from 'vue' import { useRoute } from 'vue-router' import { useMeta } from './useMeta' -import type { RouteMeta, RouteMetaValue, isMetaFunction } from '../types/route-meta.d' +import type { RouteMeta } from 'vue-router' +import type { RouteMetaValue } from '../types/route-meta' /** * Composable for automatic meta tag management based on route configuration @@ -45,7 +46,7 @@ export function useRouteMeta() { 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 } /**