File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/gatsby-source-wordpress/src Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -137,9 +137,13 @@ exports.liftRenderedField = entities =>
137137 } )
138138
139139// Exclude entities of unknown shape
140+ // Assume all entities contain a wordpress_id, except for whitelisted type wp_settings
140141exports . excludeUnknownEntities = entities =>
141142 entities . filter ( e => e . wordpress_id || e . __type === `wordpress__wp_settings` ) // Excluding entities without ID, or WP Settings
142143
144+ // Create node ID from known entities
145+ // excludeUnknownEntities whitelisted types don't contain a wordpress_id
146+ // we create the node ID based upon type if the wordpress_id doesn't exist
143147exports . createGatsbyIds = ( createNodeId , entities ) =>
144148 entities . map ( e => {
145149 if ( e . wordpress_id ) {
You can’t perform that action at this time.
0 commit comments