Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/gatsby-source-contentful/src/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,12 @@ export const createAssetNodes = ({
// The content of an entry is guaranteed to be updated if and only if the .sys.updatedAt field changed
assetNode.internal.contentDigest = assetItem.sys.updatedAt

createNodePromises.push(createNode(assetNode).then(() => assetNode))
// if the node hasn't changed, createNode may return `undefined` instead of a Promise on some versions of Gatsby
const maybePromise = createNode(assetNode)

createNodePromises.push(
maybePromise?.then ? maybePromise.then(() => assetNode) : assetNode
)
})

return createNodePromises
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/src/redux/actions/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ actions.createNode =
).find(action => action.type === `CREATE_NODE`)

if (!createNodeAction) {
return undefined
return Promise.resolve(undefined)
}

const { payload: node, traceId, parentSpan } = createNodeAction
Expand Down