mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-20 11:37:52 +02:00
Add key to stylesheet links in Head.js (#425)
* Add key to config.stylesheets.map in Head.js * Run prettier on Head.js
This commit is contained in:
parent
62893dfe28
commit
c6a9848a17
1 changed files with 4 additions and 2 deletions
|
@ -85,8 +85,10 @@ class Head extends React.Component {
|
||||||
|
|
||||||
{/* External resources */}
|
{/* External resources */}
|
||||||
{this.props.config.stylesheets &&
|
{this.props.config.stylesheets &&
|
||||||
this.props.config.stylesheets.map(function(source) {
|
this.props.config.stylesheets.map(function(source, idx) {
|
||||||
return <link rel="stylesheet" href={source} />;
|
return (
|
||||||
|
<link rel="stylesheet" key={'stylesheet' + idx} href={source} />
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
{this.props.config.scripts &&
|
{this.props.config.scripts &&
|
||||||
this.props.config.scripts.map(function(source, idx) {
|
this.props.config.scripts.map(function(source, idx) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue