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:
Harrison Shoff 2018-01-31 19:59:41 -08:00 committed by Joel Marcey
parent 62893dfe28
commit c6a9848a17

View file

@ -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) {