sanity-io / assist

Sanity AI Assist: A plugin for Sanity Studio
MIT License
13 stars 5 forks source link

fix: don't try to serialize list values if list is not an array #11

Closed hyldmo closed 11 months ago

hyldmo commented 11 months ago

Closes #5.

Some plugins or user code might use other types. For instance, a list parameter being a promise, if the list values are being populated asynchronously.

This PR adds a check that a list parameter is actually an array before running .map() on it.

snorrees commented 11 months ago

Thanks!

snorrees commented 11 months ago

Released in https://github.com/sanity-io/assist/releases/tag/v1.2.7