Skip to content

Commit

Permalink
fix: clone head.meta before manipulating
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Jul 21, 2022
1 parent b832f24 commit d15edc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/composables/head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-rout
import type { HeadObjectPlain } from '@vueuse/head'
import type { Ref } from 'vue'
import { ParsedContent } from '../types'
import { useRoute, nextTick, useHead, unref, nextTick, watch } from '#imports'
import { useRoute, nextTick, useHead, unref, watch } from '#imports'

export const useContentHead = (
_content: ParsedContent | Ref<ParsedContent>,
Expand All @@ -19,7 +19,7 @@ export const useContentHead = (

// Great basic informations from the data
head.title = head.title || data?.title
head.meta = head.meta || []
head.meta = [...(head.meta || [])]

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

0 comments on commit d15edc9

Please sign in to comment.