Skip to content

Commit 5c6d51f

Browse files
authored
fix: clone head.meta before manipulating (#1370)
1 parent 32eec9c commit 5c6d51f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/composables/head.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-rout
22
import type { HeadObjectPlain } from '@vueuse/head'
33
import type { Ref } from 'vue'
44
import { ParsedContent } from '../types'
5-
import { useRoute, nextTick, useHead, unref, nextTick, watch } from '#imports'
5+
import { useRoute, nextTick, useHead, unref, watch } from '#imports'
66

77
export const useContentHead = (
88
_content: ParsedContent | Ref<ParsedContent>,
@@ -19,7 +19,7 @@ export const useContentHead = (
1919

2020
// Great basic informations from the data
2121
head.title = head.title || data?.title
22-
head.meta = head.meta || []
22+
head.meta = [...(head.meta || [])]
2323

2424
// Grab description from `head.description` or fallback to `data.description`
2525
// @ts-ignore - We expect `head.description` from Nuxt configurations...

0 commit comments

Comments
 (0)