Skip to content

Commit cef713a

Browse files
DanielRufwardpeet
authored andcommitted
fix(graphql): findLinkedNodeByField not returning any value (#11045)
<!-- Have any questions? Check out the contributing docs at https://gatsby.app/contribute, or ask in this Pull Request and a Gatsby maintainer will be happy to help :) --> ## Description `findLinkedNodeByField` does not return anything. This PR adds the missing `return`. <!-- Write a brief description of the changes introduced by this PR --> ## Related Issues <!-- Link to the issue that is fixed by this PR (if there is one) e.g. Fixes #1234, Addresses #1234, Related to #1234, etc. -->
1 parent 6590a34 commit cef713a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gatsby/src/schema/infer-graphql-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function inferFromMapping(
189189
}
190190

191191
function findLinkedNodeByField(linkedField, value) {
192-
getNodes().find(n => n[linkedField] === value)
192+
return getNodes().find(n => n[linkedField] === value)
193193
}
194194

195195
export function findLinkedNode(value, linkedField, path) {

0 commit comments

Comments
 (0)