angeloashmore / gatsby-plugin-local-search

Gatsby plugin for providing client-side search for data available in Gatsby's GraphQL layer using a variety of engines
MIT License
51 stars 29 forks source link

feat: safely set default normalizer fields #16

Closed asyarb closed 4 years ago

asyarb commented 4 years ago

This PR changes the default normalizerFields to be safely set by checking if documents has at least one document available. Prevents breaking builds when the result of a GraphQL search query returns no nodes.