Skip to content

Commit

Permalink
fix: id generation for nested acf flexible content fields (#9006)
Browse files Browse the repository at this point in the history
* Fix: added unique id for ACF childeNodes (#8910)

* Fix: added unique id for ACF childeNodes (#8910)
  • Loading branch information
jordyvg authored and pieh committed Oct 11, 2018
1 parent 05a07c4 commit f458faf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby-source-wordpress/src/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,10 @@ const prepareACFChildNodes = (
_.each(obj, (value, key) => {
if (_.isArray(value) && value[0] && value[0].acf_fc_layout) {
obj[`${key}___NODE`] = value.map(
v =>
(v, indexItem) =>
prepareACFChildNodes(
v,
entityId,
`${entityId}_${indexItem}`,
topLevelIndex,
type + key,
children,
Expand Down

0 comments on commit f458faf

Please sign in to comment.