diff --git a/gatsby-node.js b/gatsby-node.js index 9abc051..c0d95f9 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -404,9 +404,8 @@ exports.createResolvers = function (_ref7) { return nodesData; } else { - return context.nodeModel.getNodeById({ - id: source[fileField.field.uid + '___NODE'] - }); + var id = source[fileField.field.uid + '___NODE']; + return context.nodeModel.getNodeById({ id: id }); } } })); diff --git a/src/gatsby-node.js b/src/gatsby-node.js index 47b207f..2832ea0 100644 --- a/src/gatsby-node.js +++ b/src/gatsby-node.js @@ -361,9 +361,8 @@ exports.createResolvers = ({ createResolvers }) => { return nodesData; } else { - return context.nodeModel.getNodeById({ - id: source[`${fileField.field.uid}___NODE`] - }) + const id = source[`${fileField.field.uid}___NODE`] + return context.nodeModel.getNodeById({ id }) } }, },