Skip to content

Commit

Permalink
fix(useContentHead): set title only if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed Aug 23, 2022
1 parent 46723ef commit 9b9b648
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/runtime/composables/head.ts
Expand Up @@ -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`
Expand Down

0 comments on commit 9b9b648

Please sign in to comment.