Skip to content

Commit

Permalink
Add key to stylesheet links in Head.js (#425)
Browse files Browse the repository at this point in the history
* Add key to config.stylesheets.map in Head.js

* Run prettier on Head.js
  • Loading branch information
hshoff authored and JoelMarcey committed Feb 1, 2018
1 parent 62893df commit c6a9848
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/core/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ class Head extends React.Component {

{/* External resources */}
{this.props.config.stylesheets &&
this.props.config.stylesheets.map(function(source) {
return <link rel="stylesheet" href={source} />;
this.props.config.stylesheets.map(function(source, idx) {
return (
<link rel="stylesheet" key={'stylesheet' + idx} href={source} />
);
})}
{this.props.config.scripts &&
this.props.config.scripts.map(function(source, idx) {
Expand Down

0 comments on commit c6a9848

Please sign in to comment.