Skip to content

Commit 3a66b54

Browse files
committed
fix: do not call useNuxtApp() inside getCachedData
1 parent dcd81b0 commit 3a66b54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/composables/useI18nStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function useI18nStatus() {
1515
responseType: 'json',
1616
server: false,
1717
// Cache the result to avoid refetching on navigation
18-
getCachedData: key => useNuxtApp().payload.data[key] || useNuxtApp().static.data[key],
18+
getCachedData: (key, nuxtApp) => nuxtApp.payload.data[key] ?? nuxtApp.static.data[key],
1919
})
2020

2121
/**

0 commit comments

Comments
 (0)