From 7357d502760481881290800d8f18fdd7647aa633 Mon Sep 17 00:00:00 2001 From: Asko Soukka Date: Sat, 20 Jul 2019 01:07:55 +0300 Subject: [PATCH] fix(gatsby): Add touchNode to populate typeOwners with cached data (#15918) --- packages/gatsby/src/redux/actions/public.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/gatsby/src/redux/actions/public.js b/packages/gatsby/src/redux/actions/public.js index e05a6f1475fa9..7ca245086e409 100644 --- a/packages/gatsby/src/redux/actions/public.js +++ b/packages/gatsby/src/redux/actions/public.js @@ -792,6 +792,11 @@ actions.touchNode = (options: any, plugin?: Plugin) => { nodeId = options } + const node = getNode(nodeId) + if (node && !typeOwners[node.internal.type]) { + typeOwners[node.internal.type] = node.internal.owner + } + return { type: `TOUCH_NODE`, plugin,