diff --git a/src/render.ts b/src/render.ts index 701abc6..e6f8e35 100644 --- a/src/render.ts +++ b/src/render.ts @@ -39,7 +39,13 @@ export function generateRenderContent( ): RenderContent { const helpers = getRenderHelpers(params); const htmlAttributes: Record = {}; - const meta = [...defaultMeta, ...(params.meta ?? [])]; + const meta = params.meta ?? []; + // in terms of sets: meta = params.meta ∪ (defaultMeta ∖ params.meta) + defaultMeta.forEach((defaultMetaItem) => { + if (!meta.find(({name}) => name === defaultMetaItem.name)) { + meta.push(defaultMetaItem); + } + }); const styleSheets = params.styleSheets || []; const scripts = params.scripts || []; const inlineStyleSheets = params.inlineStyleSheets || [];