From f26c97f05a65d5f4114d706c7551b77c0c42dada Mon Sep 17 00:00:00 2001 From: Cue <1493221+cuebit@users.noreply.github.com> Date: Wed, 9 Nov 2022 09:05:52 +0000 Subject: [PATCH] chore(examples): update event context (#8814) --- examples/other/locale/composables/locale.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/other/locale/composables/locale.ts b/examples/other/locale/composables/locale.ts index 991ab9678f..931a0124bb 100644 --- a/examples/other/locale/composables/locale.ts +++ b/examples/other/locale/composables/locale.ts @@ -6,8 +6,7 @@ export const useDefaultLocale = (fallback = 'en-US') => { const locale = ref(fallback) if (process.server) { // Learn more about the nuxtApp interface on https://v3.nuxtjs.org/docs/usage/nuxt-app#nuxtapp-interface-advanced - const nuxtApp = useNuxtApp() - const reqLocale = nuxtApp.ssrContext?.req.headers['accept-language']?.split(',')[0] + const reqLocale = useRequestHeaders()['accept-language']?.split(',')[0] if (reqLocale) { locale.value = reqLocale }