From 19342856f4726a9124305db11a291fff0e0464fc Mon Sep 17 00:00:00 2001 From: Jonathan Stucklen Date: Mon, 16 Sep 2019 15:22:59 -0400 Subject: [PATCH] fix: Return merged resources from recursive call. (#43) * fix: Return merged resources from recursive call. * Use let instead of var. --- gatsby-node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index 04dfd6e..8158eed 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -189,11 +189,11 @@ exports.sourceNodes = async ( links: { next } } = response - const merged = merge(data, response) + let merged = merge(data, response) if (next) { const { search } = new URL(next) - getPaginatedResource(resource, merged, search) + merged = getPaginatedResource(resource, merged, search) } return merged