diff --git a/gatsby-node.js b/gatsby-node.js index 76e8ff3..365c3d7 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -39,8 +39,8 @@ exports.createPages = ({ boundActionCreators, graphql }) => { } const artists = result.data.allArtist.edges; - artists.forEach(node => { - const path = `artists/` + node.artist.slug; + artists.forEach(({ artist }) => { + const path = `artists/` + artist.slug; createPage({ path, component: artistDetailPageTemplate, @@ -51,8 +51,8 @@ exports.createPages = ({ boundActionCreators, graphql }) => { }); const records = result.data.allRecord.edges; - records.forEach(node => { - const path = `records/` + node.record.slug; + records.forEach(({ record }) => { + const path = `records/` + record.slug; createPage({ path, component: recordDetailPageTemplate, @@ -63,8 +63,8 @@ exports.createPages = ({ boundActionCreators, graphql }) => { }); const reviews = result.data.allReview.edges; - reviews.forEach(node => { - const path = `reviews/` + node.review.slug; + reviews.forEach(({ review }) => { + const path = `reviews/` + review.slug; createPage({ path, component: reviewDetailPageTemplate, diff --git a/yarn.lock b/yarn.lock index 8995ff7..f035f0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1885,7 +1885,7 @@ color-convert@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd" -color-convert@^1.3.0, color-convert@^1.9.0: +color-convert@^1.3.0, color-convert@^1.9.0, color-convert@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: