moltin / gatsby-source-moltin

🚀 Gatsby source plugin for building Elastic Path Commerce Cloud powered eCommerce websites
https://www.gatsbyjs.org/packages/@moltin/gatsby-source-moltin
MIT License
21 stars 4 forks source link

fix: removes shadowed variable breaking merge code #41

Closed stuckj closed 5 years ago

stuckj commented 5 years ago

Remove the data local variable as it was shadowing the data variable used in getPaginatedResource. This prevented the merged data from being passed to the recursive call to getPaginatedResource.

NOTE: This looks like tail recursion so I'll have a followup PR to change this to a for loop. But, for now, this fixes the bug preventing merging from working properly.

ynnoj commented 5 years ago

:tada: This PR is included in version 1.6.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: