sanity-io / sanity-plugin-seo-pane

Run Yoast's SEO review tools using Sanity data, inside a List View Pane.
MIT License
38 stars 8 forks source link

Breaking issue as FleschReadingEaseAssement gets null and causes plugin to break when `resultsArray` is called in `mapResults` #1

Closed dorelljames closed 3 years ago

dorelljames commented 3 years ago

Getting the error below.

image

Upon further debugging, I found out that FleschReadingEaseAssement is null. Not sure how and why I get to this.

Screen Shot 2021-06-16 at 6 30 42 PM

resultsArray's first index is null obviously

Screen Shot 2021-06-16 at 6 32 10 PM

and mapResults with it (below)

const resultsMapped = mapResults(resultsArray)

causes the error as shown above.

dorelljames commented 3 years ago

Closing issue! Thanks for accepting my PR 😊