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

Remove some more unnecessary indirection working with Deferred instances #1193

Closed
wants to merge 1 commit into from
Closed

Conversation

wincent
Copy link
Contributor

@wincent wincent commented May 31, 2016

We don't need to call getPromise() on Deferred in order to invoke catch(); we can just invoke catch() directly.

I did some of this a while back in D3183390, but since then, [[ https://github.com/facebook/fbjs/commit/e3cd4970f5 | e3cd4970f5 ]] landed in fbjs, adding a catch method to Deferred, and as of [[ https://github.com/facebook/relay/commit/d653f0e5443 | d653f0e ]] we're using the latest release of fbjs in Relay, so we can make use of it.

We don't need to call `getPromise()` on `Deferred` in order to invoke `catch()`;
we can just invoke `catch()` directly.

I did some of this a while back in D3183390, but since then, [[
facebook/fbjs@e3cd4970f5 | e3cd4970f5 ]] landed in
fbjs, adding a `catch` method to `Deferred`, and as of [[
d653f0e5443 | d653f0e ]] we're
using the latest release of fbjs in Relay, so we can make use of it.
@wincent
Copy link
Contributor Author

wincent commented May 31, 2016

@facebook-github-bot import

@ghost ghost added the CLA Signed label May 31, 2016
@ghost
Copy link

ghost commented May 31, 2016

Thanks for importing. If you are an FB employee go to Phabricator to review.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant