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

[structure] Improve error when promise is passed in list items #1311

Merged
merged 1 commit into from
May 24, 2019

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented May 20, 2019

S.list().title('Things').items([Promise.resolve(thing)])

Gives something along the lines of "Expected listItem, got object"

With this change, it gives "Expected listItem, got Promise"

The documentation link that follows it gives some helpful information on how to deal with cases where you actually want to use a promise for building list items.

@rexxars rexxars requested a review from thomax May 20, 2019 12:27
@rexxars rexxars merged commit 456388b into next May 24, 2019
@rexxars rexxars deleted the structure-improve-promise-err branch May 24, 2019 15:20
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.

None yet

1 participant