Skip to content

Commit

Permalink
fix: don't overwrite existing meta, closes Intevel#5
Browse files Browse the repository at this point in the history
  • Loading branch information
e-001 committed Jan 10, 2023
1 parent 1a7cba1 commit 926d422
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ export default defineNuxtModule<ModuleOptions>({
);
}

metaTags = metaTags.filter((x) => x.content);
nuxt.options.app.head.meta = metaTags;
metaTags = metaTags.filter(x => x.content)

const existingMetaTags = nuxt.options.app.head.meta || []
nuxt.options.app.head.meta = [...existingMetaTags, ...metaTags]

// Inject options via virtual template
nuxt.options.alias["#social-meta-options"] = addTemplate({
Expand Down

0 comments on commit 926d422

Please sign in to comment.