From 9b9b6489aeceea8468eb53a6b067193318bc3397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 23 Aug 2022 13:33:16 +0200 Subject: [PATCH] fix(useContentHead): set title only if defined --- src/runtime/composables/head.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/runtime/composables/head.ts b/src/runtime/composables/head.ts index a62f91a02..1a7996c28 100644 --- a/src/runtime/composables/head.ts +++ b/src/runtime/composables/head.ts @@ -18,7 +18,10 @@ export const useContentHead = ( const head: HeadObjectPlain = Object.assign({}, data?.head || {}) // Great basic informations from the data - head.title = head.title || data?.title + const title = head.title || data?.title + if (title) { + head.title = title + } head.meta = [...(head.meta || [])] // Grab description from `head.description` or fallback to `data.description`