We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10747da commit 725f23eCopy full SHA for 725f23e
packages/gatsby-source-wordpress/src/normalize.js
@@ -225,11 +225,9 @@ exports.mapTagsCategoriesToTaxonomies = entities =>
225
226
exports.mapElementsToParent = entities => entities.map(e => {
227
if (e.wordpress_parent) {
228
- // Replace wordpress_parent with a link to the parent node of type.
+ // Create parent_element with a link to the parent node of type.
229
e.parent_element___NODE = entities
230
- .filter(el => el.__type === e.__type)
231
- .find(t => t.wordpress_id === e.wordpress_parent).id
232
- delete e.wordpress_parent
+ .find(t => t.wordpress_id === e.wordpress_parent && t.__type === e.__type).id
233
}
234
return e
235
})
0 commit comments