Skip to content

Commit

Permalink
Fix code example for custom normalizers (gatsbyjs#11708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Meier authored and gurpreet-hanjra committed Feb 14, 2019
1 parent d3cc008 commit d9253b3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/gatsby-source-wordpress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ function mapMoviesToGenres({ entities }) {

return entities.map(e => {
if (e.__type === `wordpress__wp_movie`) {
let hasGenres = e.genres && Array.isArray(e.genres) && e.categories.length
let hasGenres = e.genres && Array.isArray(e.genres) && e.genres.length
// Replace genres with links to their nodes.
if (hasGenres) {
e.genres___NODE = e.genres.map(
Expand All @@ -703,8 +703,6 @@ function mapMoviesToGenres({ entities }) {
}
return e
})

return entities
}
```

Expand Down

0 comments on commit d9253b3

Please sign in to comment.