Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

hyldmo
Copy link
Contributor

@hyldmo hyldmo commented Oct 10, 2023

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.

Some plugins or user code might use other types. For instance, a list parameter being a promise.
@snorrees
Copy link
Contributor

Thanks!

@snorrees snorrees merged commit e135df4 into sanity-io:main Oct 11, 2023
2 checks passed
@snorrees
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Cannot read properties of undefined (reading 'map')
2 participants