Skip to content

Commit

Permalink
fix(gatsby-ssr): fixes missing key warning in react (#6)
Browse files Browse the repository at this point in the history
Adds missing key property to link in gatsby-ssr.js#onRenderBody -> setHeadComponents method
  • Loading branch information
weirdpattern authored Jan 16, 2019
1 parent f6d7ea1 commit 1220f17
Show file tree
Hide file tree
Showing 5 changed files with 1,301 additions and 721 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
!gatsby-ssr.js
!index.js
!package.json
!README.md
!README.md
!LICENSE
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock = false
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"plugin"
],
"scripts": {
"build": "cross-env BABEL_ENV=production babel src --out-dir .",
"clean": "rimraf ./node_modules",
"build": "rimraf gatsby-ssr.js index.js && cross-env BABEL_ENV=production babel src --out-dir .",
"clean": "npx rimraf node_modules",
"format": "prettier --write ./{src,specs}/{,**}/*.js",
"lint": "eslint ./{src,specs}/{,**}/*.js",
"test": "jest",
Expand All @@ -46,9 +46,9 @@
"cross-env": "^5.2.0",
"eslint": "^5.9.0",
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-jest": "^22.1.1",
"eslint-plugin-json": "^1.3.2",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^1.2.0",
"jest": "^23.6.0",
Expand Down
1 change: 1 addition & 0 deletions src/gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function onRenderBody({ setHeadComponents }, options = {}) {
if (options.includeDefaultCss !== false) {
return setHeadComponents([
<link
key="gist-embeded-87673c31a5b37b5e6556b63e1081ebbc"
rel="stylesheet"
href="https://assets-cdn.github.com/assets/gist-embed-87673c31a5b37b5e6556b63e1081ebbc.css"
/>
Expand Down
Loading

0 comments on commit 1220f17

Please sign in to comment.