Skip to content

Commit

Permalink
fix: make the useCookieLocale ref import explicit (#1951)
Browse files Browse the repository at this point in the history
* fix: useCookieLocale `ref` import from `nuxt`

* fix: make the `ref` import explicit
  • Loading branch information
issenn authored Mar 29, 2023
1 parent d898a07 commit 47aea77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/composables.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { findBrowserLocale, getComposer } from 'vue-i18n-routing'
import { useRoute, useRouter, useRequestHeaders, useCookie, useNuxtApp } from '#imports'
import { ref } from 'vue'
import { parseAcceptLanguage } from '#build/i18n.internal.mjs'
import { nuxtI18nInternalOptions, nuxtI18nOptionsDefault, localeCodes as _localeCodes } from '#build/i18n.options.mjs'
import {
Expand Down Expand Up @@ -170,7 +171,7 @@ export function useCookieLocale(
localeCodes: _localeCodes
}
): Ref<string> {
// @ts-ignore NOTE: `ref` is auto-imported from `nuxt`
// Support for importing from `#imports` is generated by auto `imports` nuxt module, so `ref` is imported from `vue`
const locale: Ref<string> = ref('')

if (options.useCookie) {
Expand Down

0 comments on commit 47aea77

Please sign in to comment.