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

Use done() instead of then() #1

Merged
merged 1 commit into from
Jan 9, 2017
Merged

Use done() instead of then() #1

merged 1 commit into from
Jan 9, 2017

Conversation

jsor
Copy link
Contributor

@jsor jsor commented Jan 9, 2017

When not returning a promise, done() should be used to not swallow exceptions thrown inside the callbacks.
Also, done() does not create unused child promises, saving a bit of resources.

Passing $promise through resolve() makes extra sure we're working on ExtendedPromiseInterface. Theoretically, this could be ommitted since all promises from react/promise implementing PromiseInterface also implement ExtendedPromiseInterface (applies to react/promise 2.x).

When not returning a promise, done() should be used to not swallow
exceptions thrown inside the callbacks.
Also, done() does not create unused child promises, saving a bit
of resources.
@WyriHaximus WyriHaximus merged commit a1d7976 into php-api-clients:master Jan 9, 2017
@WyriHaximus
Copy link
Member

Good catch, thanks 👍

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.

2 participants