Skip to content

Commit

Permalink
improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBarnes committed Mar 29, 2021
1 parent f9eb2f9 commit 1ddbb5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}
}));
Expand Down
5 changes: 2 additions & 3 deletions src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
},
},
Expand Down

0 comments on commit 1ddbb5c

Please sign in to comment.