diff --git a/packages/nuxt/src/head/runtime/lib/vueuse-head.plugin.ts b/packages/nuxt/src/head/runtime/lib/vueuse-head.plugin.ts index 61620f1cdd..0bd2c5d6fe 100644 --- a/packages/nuxt/src/head/runtime/lib/vueuse-head.plugin.ts +++ b/packages/nuxt/src/head/runtime/lib/vueuse-head.plugin.ts @@ -15,20 +15,10 @@ export default defineNuxtPlugin((nuxtApp) => { headReady = true }) - const titleTemplate = ref() - nuxtApp._useHead = (_meta: MetaObject | ComputedGetter) => { const meta = ref(_meta) - if ('titleTemplate' in meta.value) { - titleTemplate.value = meta.value.titleTemplate - } - const headObj = computed(() => { const overrides: MetaObject = { meta: [] } - // cast a null titleTemplate to an empty string so @vueuse/head ignores it - if (titleTemplate.value === null) { - overrides.titleTemplate = '' - } if (meta.value.charset) { overrides.meta!.push({ key: 'charset', charset: meta.value.charset }) } diff --git a/test/fixtures/basic/pages/index.vue b/test/fixtures/basic/pages/index.vue index 092ca160c3..bc8f28632e 100644 --- a/test/fixtures/basic/pages/index.vue +++ b/test/fixtures/basic/pages/index.vue @@ -27,7 +27,7 @@ const config = useRuntimeConfig() // reset title template example useHead({ - titleTemplate: null + titleTemplate: '' }) const foo = useFoo()