Skip to content

Commit dec2730

Browse files
authoredMar 18, 2025··
fix(useLocale): unique symbol to use in @nuxt/ui-pro (#3603)
1 parent c8ca604 commit dec2730

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/runtime/composables/useLocale.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { Locale, Messages } from '../types/locale'
55
import { buildLocaleContext } from '../utils/locale'
66
import en from '../locale/en'
77

8-
export const localeContextInjectionKey: InjectionKey<Ref<Locale<unknown> | undefined>> = Symbol('nuxt-ui.locale-context')
8+
export const localeContextInjectionKey: InjectionKey<Ref<Locale<unknown> | undefined>> = Symbol.for('nuxt-ui.locale-context')
99

1010
const _useLocale = (localeOverrides?: Ref<Locale<Messages> | undefined>) => {
1111
const locale = localeOverrides || toRef(inject<Locale<Messages>>(localeContextInjectionKey))

0 commit comments

Comments
 (0)
Please sign in to comment.