algolia / gatsby-plugin-algolia

A plugin to push to Algolia based on graphQl queries
https://yarn.pm/gatsby-plugin-algolia
Apache License 2.0
177 stars 45 forks source link

[fix] Fix async issue with transformer #76

Closed tedsczelecki closed 4 years ago

tedsczelecki commented 4 years ago

When passing an async function, you will get the error TypeError: transformer(...).map is not a function which is correct becuse Promise.map is not a function. Adding the parentheses will execute the async transformer, and then apply .map to the array returned

Addesses issue: https://github.com/algolia/gatsby-plugin-algolia/issues/73

Haroenv commented 4 years ago

good fix!