From cef713a7dac7ccb2b51c21cb4d7bc9daefa65b1d Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Tue, 15 Jan 2019 08:18:52 +0100 Subject: [PATCH] fix(graphql): findLinkedNodeByField not returning any value (#11045) ## Description `findLinkedNodeByField` does not return anything. This PR adds the missing `return`. ## Related Issues --- packages/gatsby/src/schema/infer-graphql-type.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby/src/schema/infer-graphql-type.js b/packages/gatsby/src/schema/infer-graphql-type.js index 4e9c24ebd5802..741965227a30f 100644 --- a/packages/gatsby/src/schema/infer-graphql-type.js +++ b/packages/gatsby/src/schema/infer-graphql-type.js @@ -189,7 +189,7 @@ function inferFromMapping( } function findLinkedNodeByField(linkedField, value) { - getNodes().find(n => n[linkedField] === value) + return getNodes().find(n => n[linkedField] === value) } export function findLinkedNode(value, linkedField, path) {