File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,12 @@ export const setupGlobalComputed = (
5959 router : Router ,
6060 clientConfigs : ClientConfig [ ]
6161) : GlobalComputed => {
62- // create global computed
6362 const layouts = computed ( ( ) => resolvers . resolveLayouts ( clientConfigs ) )
63+ // create eager computed for route path and locale, so that route changes
64+ // won't make all downstream computed re-evaluate
65+ const routePath = computedEager ( ( ) => router . currentRoute . value . path )
6466 const routeLocale = computedEager ( ( ) =>
65- resolvers . resolveRouteLocale (
66- siteData . value . locales ,
67- router . currentRoute . value . path
68- )
67+ resolvers . resolveRouteLocale ( siteData . value . locales , routePath . value )
6968 )
7069 const siteLocaleData = computed ( ( ) =>
7170 resolvers . resolveSiteLocaleData ( siteData . value , routeLocale . value )
You can’t perform that action at this time.
0 commit comments