Skip to content

Commit 9b9b648

Browse files
committed
fix(useContentHead): set title only if defined
1 parent 46723ef commit 9b9b648

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/runtime/composables/head.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export const useContentHead = (
1818
const head: HeadObjectPlain = Object.assign({}, data?.head || {})
1919

2020
// Great basic informations from the data
21-
head.title = head.title || data?.title
21+
const title = head.title || data?.title
22+
if (title) {
23+
head.title = title
24+
}
2225
head.meta = [...(head.meta || [])]
2326

2427
// Grab description from `head.description` or fallback to `data.description`

0 commit comments

Comments
 (0)