forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dedupe only items with unique key (vercel#5800)
Fixes vercel#3705 Fixes vercel#4656 - No longer automatically dedupe certain tags. Only the ones we know are *never* going to be duplicate like charSet, title etc. - Fix `key=""` behavior, making sure that if a unique key is provided tags are deduped based on that. For example: ```jsx <meta property='fb:pages' content='one'> <meta property='fb:pages' content='two'> ``` Would currently cause ```jsx <meta property='fb:pages' content='two'> ``` ### After this change: ```jsx <meta property='fb:pages' content='one'> <meta property='fb:pages' content='two'> ``` Then if you use next/head multiple times / want to be able to override: ```jsx <meta property='fb:pages' content='one' key="not-unique-key"> <meta property='fb:pages' content='two' key="not-unique-key"> ``` Would cause: ```jsx <meta property='fb:pages' content='two'> ``` As `key` gets deduped correctly after this PR, similar to how React itself works.
- Loading branch information
1 parent
58f5dd2
commit 9890e06
Showing
3 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters