Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clone head.meta before manipulating #1370

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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