fix(nuxt): remove $ from generated id in useId (#25615)

This commit is contained in:
Daniel Roe 2024-02-04 22:13:17 +00:00 committed by GitHub
parent e8d1219886
commit 82173ad1a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,8 @@ export function useId (key?: string): string {
if (typeof key !== 'string') {
throw new TypeError('[nuxt] [useId] key must be a string.')
}
// TODO: implement in composable-keys
key = key.slice(1)
const nuxtApp = useNuxtApp()
const instance = getCurrentInstance()