Skip to content

Commit

Permalink
Dedupe meta tag in favor of custom tag defined in _app
Browse files Browse the repository at this point in the history
  • Loading branch information
melanieseltzer committed Oct 4, 2019
1 parent 9af5879 commit 6e2925d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/next/next-server/lib/head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ function unique() {
keys.add(h.key)
return true
}

// If custom meta tag has been added the key will be prepended with `.$`, we can
// check for this and dedupe in favor of the custom one, so the default
// is not rendered as well
if (keys.has(`.$${h.key}`)) return false

switch (h.type) {
case 'title':
case 'base':
Expand Down

0 comments on commit 6e2925d

Please sign in to comment.