Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Commit

Permalink
fix: Return merged resources from recursive call. (#43)
Browse files Browse the repository at this point in the history
* fix: Return merged resources from recursive call.

* Use let instead of var.
  • Loading branch information
stuckj authored and notrab committed Sep 16, 2019
1 parent ab764f5 commit 1934285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1934285

Please sign in to comment.