From d15edc96be3c149b434b065288280dca16c43709 Mon Sep 17 00:00:00 2001 From: Ahad Birang Date: Thu, 21 Jul 2022 13:17:45 +0200 Subject: [PATCH] fix: clone `head.meta` before manipulating --- src/runtime/composables/head.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/composables/head.ts b/src/runtime/composables/head.ts index e04b262d9..ef1683105 100644 --- a/src/runtime/composables/head.ts +++ b/src/runtime/composables/head.ts @@ -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, @@ -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...