Skip to content

Commit

Permalink
Fix code example for custom normalizers (#11708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Meier authored and m-allanson committed Feb 12, 2019
1 parent e73c03a commit 9433b6c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/gatsby-source-wordpress/README.md
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 9433b6c

Please sign in to comment.